qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/2] ui: introduce vfio_display_reset


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH 2/2] ui: introduce vfio_display_reset
Date: Mon, 23 Apr 2018 15:12:02 +0200
User-agent: NeoMutt/20180323

> +    surface = qemu_console_surface(vdev->dpy->con);

> +    dpy_gl_scanout_disable(vdev->dpy->con);
> +    dpy_gfx_switch_surface(vdev->dpy->con, surface);

Hmm, so you ask which surface is active, then switch to it.
Why?

Maybe you just need a full display update after disabling the gl
scanout?

cheers,
  Gerd

PS: maybe adding a dpy_gfx_update_full() helper is useful:

diff --git a/include/ui/console.h b/include/ui/console.h
index 37a8d68d29..981b519dde 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -291,6 +291,7 @@ bool dpy_ui_info_supported(QemuConsole *con);
 int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info);
 
 void dpy_gfx_update(QemuConsole *con, int x, int y, int w, int h);
+void dpy_gfx_update_full(QemuConsole *con);
 void dpy_gfx_replace_surface(QemuConsole *con,
                              DisplaySurface *surface);
 void dpy_text_cursor(QemuConsole *con, int x, int y);
diff --git a/ui/console.c b/ui/console.c
index 3fb2f4e09f..b02510cdca 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1574,6 +1574,16 @@ void dpy_gfx_update(QemuConsole *con, int x, int y, int 
w, int h)
     }
 }
 
+void dpy_gfx_update_full(QemuConsole *con)
+{
+    if (!con->surface) {
+        return;
+    }
+    dpy_gfx_update(con, 0, 0,
+                   surface_width(con->surface),
+                   surface_height(con->surface));
+}
+
 void dpy_gfx_replace_surface(QemuConsole *con,
                              DisplaySurface *surface)
 {




reply via email to

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