mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-19 09:48:16 +00:00
vga: fixes for stdvga, vhost-user-gpu and virtio-gpu.
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoDKM/7k6F6eZAf59TLbY7tPocTgFAmDI5fsACgkQTLbY7tPo cTg1TQ//deylP36HK0kQxtbB3nbx/aW9jThbsyWZkfvMdkpeEk9svSF+VKIf58Sv DTCQBttmd9GzsRK29gz5xZYzDa7PnomICFoc/Km1FuOkfH1gODhJoEgHbi17nY8D RGzW0JaigFkyGirWB2CBkHkhR3ITS7+pfZNxHTV9OkQiaBbHvWSyDU/vGnQpb0dm gOZTaqqD+Q1jij3ujDc7iqfCRpnRxz0Rn3EmgubvSuLirOUjP6SwX9pVg/qhUbo9 QCTe78GktOuODhD69omZCK888nDrLPieUIorTHTEIMEkTp5bESZR7ySJ1rcr8e6g lGHg8saXEWil7ZhxrOEFfk+izllSEeArKcgQcbdZdeRYrvGQuVdIz4fmQe6M4XTF VMqFNWwyp2Ysmqz5PsdPlxij1hYoeK1MnQItKwDZ0ugITLZSV6OCVuqkvcgvoXTH MH4zKf5yGpu6wxl0wtf6ibmqBgPPem3hsNfxTGcyBz4jbjI2NHS061u47ry4B81r VvtOLUq0r9PqKfBd2qN39p0xfq05VZ103Ve2T7y47HmIeT1h2cXRuvP7xzGGbrdO LsB+BLlLgKr41ltNmmHodv97SrPRbFGyI2KhbxarNnN6DymHfKcDIf4VYuW7D+bu FWqQ9W2RIpXE3+/wToLjYrDANPIVDlgZGSbSBHAzQbTvPRigwLU= =UcmC -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/vga-20210615-pull-request' into staging vga: fixes for stdvga, vhost-user-gpu and virtio-gpu. # gpg: Signature made Tue 15 Jun 2021 18:40:11 BST # gpg: using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/vga-20210615-pull-request: virtio-gpu: move scanout_id sanity check vhost-user-gpu: reorder free calls. vga: Allow writing VBE_DISPI_ID5 to ID register Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
e3897b75fd
@ -350,8 +350,8 @@ vg_resource_create_2d(VuGpu *g,
|
||||
if (!res->image) {
|
||||
g_critical("%s: resource creation failed %d %d %d",
|
||||
__func__, c2d.resource_id, c2d.width, c2d.height);
|
||||
g_free(res);
|
||||
vugbm_buffer_destroy(&res->buffer);
|
||||
g_free(res);
|
||||
cmd->error = VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY;
|
||||
return;
|
||||
}
|
||||
|
@ -752,7 +752,8 @@ void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val)
|
||||
val == VBE_DISPI_ID1 ||
|
||||
val == VBE_DISPI_ID2 ||
|
||||
val == VBE_DISPI_ID3 ||
|
||||
val == VBE_DISPI_ID4) {
|
||||
val == VBE_DISPI_ID4 ||
|
||||
val == VBE_DISPI_ID5) {
|
||||
s->vbe_regs[s->vbe_index] = val;
|
||||
}
|
||||
break;
|
||||
|
@ -610,12 +610,6 @@ static void virtio_gpu_do_set_scanout(VirtIOGPU *g,
|
||||
struct virtio_gpu_scanout *scanout;
|
||||
uint8_t *data;
|
||||
|
||||
if (scanout_id >= g->parent_obj.conf.max_outputs) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: illegal scanout id specified %d",
|
||||
__func__, scanout_id);
|
||||
*error = VIRTIO_GPU_RESP_ERR_INVALID_SCANOUT_ID;
|
||||
return;
|
||||
}
|
||||
scanout = &g->parent_obj.scanout[scanout_id];
|
||||
|
||||
if (r->x > fb->width ||
|
||||
@ -694,6 +688,13 @@ static void virtio_gpu_set_scanout(VirtIOGPU *g,
|
||||
trace_virtio_gpu_cmd_set_scanout(ss.scanout_id, ss.resource_id,
|
||||
ss.r.width, ss.r.height, ss.r.x, ss.r.y);
|
||||
|
||||
if (ss.scanout_id >= g->parent_obj.conf.max_outputs) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: illegal scanout id specified %d",
|
||||
__func__, ss.scanout_id);
|
||||
cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_SCANOUT_ID;
|
||||
return;
|
||||
}
|
||||
|
||||
if (ss.resource_id == 0) {
|
||||
virtio_gpu_disable_scanout(g, ss.scanout_id);
|
||||
return;
|
||||
@ -730,6 +731,13 @@ static void virtio_gpu_set_scanout_blob(VirtIOGPU *g,
|
||||
ss.r.width, ss.r.height, ss.r.x,
|
||||
ss.r.y);
|
||||
|
||||
if (ss.scanout_id >= g->parent_obj.conf.max_outputs) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: illegal scanout id specified %d",
|
||||
__func__, ss.scanout_id);
|
||||
cmd->error = VIRTIO_GPU_RESP_ERR_INVALID_SCANOUT_ID;
|
||||
return;
|
||||
}
|
||||
|
||||
if (ss.resource_id == 0) {
|
||||
virtio_gpu_disable_scanout(g, ss.scanout_id);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user