ui/gtk-egl.c | 1 + ui/gtk-gl-area.c | 1 + 2 files changed, 2 insertions(+)
From: Dongwon Kim <dongwon.kim@intel.com>
Draw routine needs to be manually invoked in the next refresh
if there is a scanout blob from the guest. This is to prevent
a situation where there is a scheduled draw event but it won't
happen bacause the window is currently in inactive state
(minimized or tabified). If draw is not done for a long time,
gl_block timeout and/or fence timeout (on the guest) will happen
eventually.
v2: Use gd_gl_area_draw(vc) in gtk-gl-area.c
Suggested-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
ui/gtk-egl.c | 1 +
ui/gtk-gl-area.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index 3af5ac5bcf..75f6b9011a 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -150,6 +150,7 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
vc, vc->window ? vc->window : vc->gfx.drawing_area);
if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) {
+ gd_egl_draw(vc);
return;
}
diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 52dcac161e..4fff957c3f 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -126,6 +126,7 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
gd_update_monitor_refresh_rate(vc, vc->window ? vc->window : vc->gfx.drawing_area);
if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) {
+ gd_gl_area_draw(vc);
return;
}
--
2.34.1
On Sat, Apr 27, 2024 at 2:56 AM <dongwon.kim@intel.com> wrote: > > From: Dongwon Kim <dongwon.kim@intel.com> > > Draw routine needs to be manually invoked in the next refresh > if there is a scanout blob from the guest. This is to prevent > a situation where there is a scheduled draw event but it won't > happen bacause the window is currently in inactive state > (minimized or tabified). If draw is not done for a long time, > gl_block timeout and/or fence timeout (on the guest) will happen > eventually. > > v2: Use gd_gl_area_draw(vc) in gtk-gl-area.c > > Suggested-by: Vivek Kasireddy <vivek.kasireddy@intel.com> > Cc: Gerd Hoffmann <kraxel@redhat.com> > Cc: Marc-André Lureau <marcandre.lureau@redhat.com> > Cc: Daniel P. Berrangé <berrange@redhat.com> > Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com> > --- > ui/gtk-egl.c | 1 + > ui/gtk-gl-area.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c > index 3af5ac5bcf..75f6b9011a 100644 > --- a/ui/gtk-egl.c > +++ b/ui/gtk-egl.c > @@ -150,6 +150,7 @@ void gd_egl_refresh(DisplayChangeListener *dcl) > vc, vc->window ? vc->window : vc->gfx.drawing_area); > > if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) { > + gd_egl_draw(vc); > return; > } > > diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c > index 52dcac161e..4fff957c3f 100644 > --- a/ui/gtk-gl-area.c > +++ b/ui/gtk-gl-area.c > @@ -126,6 +126,7 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl) > gd_update_monitor_refresh_rate(vc, vc->window ? vc->window : vc->gfx.drawing_area); > > if (vc->gfx.guest_fb.dmabuf && vc->gfx.guest_fb.dmabuf->draw_submitted) { > + gd_gl_area_draw(vc); > return; > } > > -- > 2.34.1 > > -- Marc-André Lureau
© 2016 - 2024 Red Hat, Inc.