virtio-gpu: Respect UI refresh rate for EDID
authorAkihiko Odaki <akihiko.odaki@gmail.com>
Sat, 26 Feb 2022 11:55:16 +0000 (20:55 +0900)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 14 Jun 2022 08:34:37 +0000 (10:34 +0200)
Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20220226115516.59830-4-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/virtio-gpu-base.c
hw/display/virtio-gpu.c
include/hw/virtio/virtio-gpu.h

index b21d6e5b0be8cb71c70781ae085d67e7052d53ae..a29f191aa82ea14371945ea78c71100f4010437b 100644 (file)
@@ -79,6 +79,7 @@ static void virtio_gpu_ui_info(void *opaque, uint32_t idx, QemuUIInfo *info)
 
     g->req_state[idx].x = info->xoff;
     g->req_state[idx].y = info->yoff;
+    g->req_state[idx].refresh_rate = info->refresh_rate;
     g->req_state[idx].width = info->width;
     g->req_state[idx].height = info->height;
     g->req_state[idx].width_mm = info->width_mm;
index 55c6dd57631837c3ee82b7e1225d89a1a2992a45..20cc703dcc6e57dbb8980e278cf3f9e26ce55c35 100644 (file)
@@ -217,6 +217,7 @@ virtio_gpu_generate_edid(VirtIOGPU *g, int scanout,
         .height_mm = b->req_state[scanout].height_mm,
         .prefx = b->req_state[scanout].width,
         .prefy = b->req_state[scanout].height,
+        .refresh_rate = b->req_state[scanout].refresh_rate,
     };
 
     edid->size = cpu_to_le32(sizeof(edid->edid));
index afff9e158e312826c78af22462d70c78a40857bc..2e28507efe2157a75e60531fa3d47f57b76be58e 100644 (file)
@@ -80,6 +80,7 @@ struct virtio_gpu_scanout {
 struct virtio_gpu_requested_state {
     uint16_t width_mm, height_mm;
     uint32_t width, height;
+    uint32_t refresh_rate;
     int x, y;
 };