mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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,"
|
||||
|
||||
Reference in New Issue
Block a user