qemu-devel
[Top][All Lists]
Advanced

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

Re: [PULL 06/19] ui/gtk: set scanout-mode right before scheduling draw


From: Kim, Dongwon
Subject: Re: [PULL 06/19] ui/gtk: set scanout-mode right before scheduling draw
Date: Sun, 23 Jul 2023 21:47:24 -0700
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

Hi there,

I guess removing this line would have been causing the problem. Can you add this line back and test it?

diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index eee821d73a..98b3a116bf 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -242,7 +242,6 @@ void gd_egl_scanout_texture(DisplayChangeListener *dcl,
      eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
                     vc->gfx.esurface, vc->gfx.ectx);
  -    gtk_egl_set_scanout_mode(vc, true);
      egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
                           backing_id, false);
  }

Thanks!

On 7/20/2023 11:53 PM, Volker Rümelin wrote:
Am 17.07.23 um 14:45 schrieb marcandre.lureau@redhat.com:
From: Dongwon Kim<dongwon.kim@intel.com>

Setting scanout mode is better to be done very last minute
right because the mode can be reset anytime after it is set in
dpy_gl_scanout_texture by any asynchronouse dpy_refresh call,
which eventually cancels drawing of the guest scanout texture.

Hi Dongwon,

this patch breaks the QEMU guest display on my system. QEMU was started with ./qemu-system-x86_64 -machine q35 -device virtio-vga-gl,xres=1280,yres=768 -display gtk,zoom-to-fit=off,gl=on. I can see the OVMF boot screen and then GRUB. After Linux was started, plymouth normally shows the OVMF boot logo and a rotating spinner. With your patch the guest screen stays black and I see a text cursor in the upper left corner. It seems the guest works without issues. I can use ssh to log in and I can't find any obvious errors in the guest log files. I tested on a host GNOME desktop under X11 and again under Wayland. In both cases the result is a black guest screen.

With best regards,
Volker

Cc: Gerd Hoffmann<kraxel@redhat.com>
Cc: Marc-André Lureau<marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy<vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim<dongwon.kim@intel.com>
Acked-by: Marc-André Lureau<marcandre.lureau@redhat.com>
Message-ID:<20230706183355.29361-1-dongwon.kim@intel.com>
---
  ui/gtk-egl.c     | 2 +-
  ui/gtk-gl-area.c | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index eee821d73a..98b3a116bf 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -242,7 +242,6 @@ void gd_egl_scanout_texture(DisplayChangeListener *dcl,
      eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
                     vc->gfx.esurface, vc->gfx.ectx);
  -    gtk_egl_set_scanout_mode(vc, true);
      egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
                           backing_id, false);
  }
@@ -353,6 +352,7 @@ void gd_egl_flush(DisplayChangeListener *dcl,
      if (vc->gfx.guest_fb.dmabuf && !vc->gfx.guest_fb.dmabuf->draw_submitted) {
          graphic_hw_gl_block(vc->gfx.dcl.con, true);
          vc->gfx.guest_fb.dmabuf->draw_submitted = true;
+        gtk_egl_set_scanout_mode(vc, true);
          gtk_widget_queue_draw_area(area, x, y, w, h);
          return;
      }
diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 4513d3d059..28d9e49888 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -264,7 +264,6 @@ void gd_gl_area_scanout_texture(DisplayChangeListener *dcl,
          return;
      }
  -    gtk_gl_area_set_scanout_mode(vc, true);
      egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
                           backing_id, false);
  }
@@ -284,6 +283,7 @@ void gd_gl_area_scanout_flush(DisplayChangeListener *dcl,       if (vc->gfx.guest_fb.dmabuf && !vc->gfx.guest_fb.dmabuf->draw_submitted) {
          graphic_hw_gl_block(vc->gfx.dcl.con, true);
          vc->gfx.guest_fb.dmabuf->draw_submitted = true;
+        gtk_gl_area_set_scanout_mode(vc, true);
      }
gtk_gl_area_queue_render(GTK_GL_AREA(vc->gfx.drawing_area));
  }




reply via email to

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