Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20151020-1…
Browse files Browse the repository at this point in the history
…' into staging

vga: enable virtio-vga for pseries, vmsvga cursor checks.

# gpg: Signature made Tue 20 Oct 2015 08:27:44 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-vga-20151020-1:
  vmsvga: more cursor checks
  ppc/spapr: Allow VIRTIO_VGA

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Oct 20, 2015
2 parents df81978 + 5829b09 commit b38c049
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions default-configs/ppc64-softmmu.mak
Expand Up @@ -3,6 +3,7 @@
include pci.mak
include sound.mak
include usb.mak
CONFIG_VIRTIO_VGA=y
CONFIG_ISA_MMIO=y
CONFIG_ESCC=y
CONFIG_M48T59=y
Expand Down
11 changes: 7 additions & 4 deletions hw/display/vmware_vga.c
Expand Up @@ -488,10 +488,10 @@ static inline int vmsvga_fill_rect(struct vmsvga_state_s *s,
#endif

struct vmsvga_cursor_definition_s {
int width;
int height;
uint32_t width;
uint32_t height;
int id;
int bpp;
uint32_t bpp;
int hot_x;
int hot_y;
uint32_t mask[1024];
Expand Down Expand Up @@ -658,7 +658,10 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s)
cursor.bpp = vmsvga_fifo_read(s);

args = SVGA_BITMAP_SIZE(x, y) + SVGA_PIXMAP_SIZE(x, y, cursor.bpp);
if (SVGA_BITMAP_SIZE(x, y) > sizeof cursor.mask ||
if (cursor.width > 256 ||
cursor.height > 256 ||
cursor.bpp > 32 ||
SVGA_BITMAP_SIZE(x, y) > sizeof cursor.mask ||
SVGA_PIXMAP_SIZE(x, y, cursor.bpp) > sizeof cursor.image) {
goto badcmd;
}
Expand Down
1 change: 1 addition & 0 deletions hw/ppc/spapr.c
Expand Up @@ -1169,6 +1169,7 @@ static int spapr_vga_init(PCIBus *pci_bus)
case VGA_DEVICE:
return true;
case VGA_STD:
case VGA_VIRTIO:
return pci_vga_init(pci_bus) != NULL;
default:
fprintf(stderr, "This vga model is not supported,"
Expand Down

0 comments on commit b38c049

Please sign in to comment.