qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1 1/2] virtio-gpu: Provide position info (x, y) to the Guest


From: Vivek Kasireddy
Subject: [PATCH v1 1/2] virtio-gpu: Provide position info (x, y) to the Guest
Date: Thu, 17 Nov 2022 17:37:22 -0800

While filling out the display info such as width, height to
be provided to the Guest, make sure that the position information
(x, y) is also included. This position info corresponds with the
x and y fields mentioned in the spec:
https://github.com/oasis-tcs/virtio-spec/blob/master/virtio-gpu.tex#L343

Cc: Dongwon Kim <dongwon.kim@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
---
 hw/display/virtio-gpu-base.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c
index a29f191aa8..3b6b480131 100644
--- a/hw/display/virtio-gpu-base.c
+++ b/hw/display/virtio-gpu-base.c
@@ -47,6 +47,8 @@ virtio_gpu_base_fill_display_info(VirtIOGPUBase *g,
             dpy_info->pmodes[i].enabled = 1;
             dpy_info->pmodes[i].r.width = cpu_to_le32(g->req_state[i].width);
             dpy_info->pmodes[i].r.height = cpu_to_le32(g->req_state[i].height);
+            dpy_info->pmodes[i].r.x = cpu_to_le32(g->req_state[i].x);
+            dpy_info->pmodes[i].r.y = cpu_to_le32(g->req_state[i].y);
         }
     }
 }
-- 
2.37.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]