summaryrefslogtreecommitdiff
path: root/hw/display/virtio-gpu.c
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@gmail.com>2021-02-25 19:13:16 +0900
committerGerd Hoffmann <kraxel@redhat.com>2021-03-04 09:35:36 +0100
commited8f3fe6898e0f3fea2ece7c87464a06098b2300 (patch)
tree64f5dfb3c50a83455400a33b52264ca8f4eb31d0 /hw/display/virtio-gpu.c
parentc821a58ee7003c2a0567dddaee33c2a5ae71c404 (diff)
downloadqemu-ed8f3fe6898e0f3fea2ece7c87464a06098b2300.zip
virtio-gpu: Do not distinguish the primary console
In the past, virtio-gpu set NULL as the surface for the secondary consoles to hide its window. The distinction is now handled in ui/console and the display backends and virtio-gpu does no longer have to do that. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Message-Id: <20210225101316.83940-3-akihiko.odaki@gmail.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/virtio-gpu.c')
-rw-r--r--hw/display/virtio-gpu.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index c1f17bec17..c9f5e36fd0 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -325,7 +325,6 @@ static void virtio_gpu_disable_scanout(VirtIOGPU *g, int scanout_id)
{
struct virtio_gpu_scanout *scanout = &g->parent_obj.scanout[scanout_id];
struct virtio_gpu_simple_resource *res;
- DisplaySurface *ds = NULL;
if (scanout->resource_id == 0) {
return;
@@ -336,13 +335,7 @@ static void virtio_gpu_disable_scanout(VirtIOGPU *g, int scanout_id)
res->scanout_bitmask &= ~(1 << scanout_id);
}
- if (scanout_id == 0) {
- /* primary head */
- ds = qemu_create_placeholder_surface(scanout->width ?: 640,
- scanout->height ?: 480,
- "Guest disabled display.");
- }
- dpy_gfx_replace_surface(scanout->con, ds);
+ dpy_gfx_replace_surface(scanout->con, NULL);
scanout->resource_id = 0;
scanout->ds = NULL;
scanout->width = 0;