diff mbox series

[PULL,01/19] ui/gtk: fix passing y0_top parameter to scanout

Message ID 20230528132016.3218152-2-marcandre.lureau@redhat.com
State New
Headers show
Series [PULL,01/19] ui/gtk: fix passing y0_top parameter to scanout | expand

Commit Message

Marc-André Lureau May 28, 2023, 1:19 p.m. UTC
From: Erico Nunes <ernunes@redhat.com>

The dmabuf->y0_top flag is passed to .dpy_gl_scanout_dmabuf(), however
in the gtk ui both implementations dropped it when doing the next
scanout_texture call.

Fixes flipped linux console using vhost-user-gpu with the gtk ui
display.

Signed-off-by: Erico Nunes <ernunes@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230220175605.43759-1-ernunes@redhat.com>
---
 ui/gtk-egl.c     | 2 +-
 ui/gtk-gl-area.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index e84431790c..557668e418 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -256,7 +256,7 @@  void gd_egl_scanout_dmabuf(DisplayChangeListener *dcl,
     }
 
     gd_egl_scanout_texture(dcl, dmabuf->texture,
-                           false, dmabuf->width, dmabuf->height,
+                           dmabuf->y0_top, dmabuf->width, dmabuf->height,
                            0, 0, dmabuf->width, dmabuf->height);
 
     if (dmabuf->allow_fences) {
diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 7696df1f6b..c384a1516b 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -298,7 +298,7 @@  void gd_gl_area_scanout_dmabuf(DisplayChangeListener *dcl,
     }
 
     gd_gl_area_scanout_texture(dcl, dmabuf->texture,
-                               false, dmabuf->width, dmabuf->height,
+                               dmabuf->y0_top, dmabuf->width, dmabuf->height,
                                0, 0, dmabuf->width, dmabuf->height);
 
     if (dmabuf->allow_fences) {