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

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJWJezwAAoJEEy22O7T6HE4X+QP/2viVPklWuE1ZlGyq/2vGUp3
 yzxRDO0eK/xse9gRVA8oQq1K9ChTw8iIiLinAoBKP7ABS5aYf424aunyf12pI/o9
 nE47pZ84YiORdIWa6lPdTY1j2cVt832gs3aSWt7eh0YcBapM4NZi2xOXjhnReZCB
 t5QAkhqFbg9mf80Nxb2YS2fycA9gZILg27j6T4kmtfZ7xQEsFNjWywXEnZGEhGJ4
 byYOSDFzgImUzTDnaBkKsAnQaR+9THIezPG/6wJ+xb4gJc4n4NwnYzG3VP9+LHNo
 38d3MT3HhzTu/uqHKYM52736ZkWYSyqb/+hXpwI6rcfZN7iEDSgQ9Fxgb+E0shHd
 PpAOXyUJAe2ZgjwOSQ4MJ0H0a8i2BxFswHjcPpkMD5cFVA05yFHZarv5gLOPyHtF
 JZ1gH9BkCS+8HPVkyyr0+m5H5Tbt0jejGV8Px4OH5axt0h8Rs+83FlnattR9NyUR
 6+zkT9CF0HM/Gyv1ukup98jhYOqjGPfSk3/yQstX+ASBMaLyKn8Qw/6pIbrfuJK9
 OICyfehZxGGuBuFgPTmA4EFLE7apXgS/FEHyTZP6rywOWWDdcKdV0F1BOehn6EgT
 E97Tzoc7RSR1EwnC9qv4SWipMyThCBU20iU+T9nV/cgtyVCoLHTQNcrbOpcFvefI
 HNESXWadPr/Ko8UBHmTB
 =VSOU
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20151020-1' 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>
This commit is contained in:
Peter Maydell 2015-10-20 12:17:53 +01:00
commit b38c0494c1
3 changed files with 9 additions and 4 deletions

View File

@ -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

View File

@ -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];
@ -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;
}

View File

@ -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,"