Skip to contentSkip to conversation

ui/gtk: fix passing y0_top parameter to scanout

PATCH In review Erico Nunes 2 participants 3 messages Feb 20, 2023 – May 11, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ui/gtk: fix passing y0_top parameter to scanout

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.

---
 ui/gtk-egl.c     | 2 +-
 ui/gtk-gl-area.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
ui/gtk-egl.c +1 -1
index e84431790c..557668e418 100644
@@ -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) {
ui/gtk-gl-area.c +1 -1
index 7696df1f6b..c384a1516b 100644
@@ -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) {
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Erico Nunes

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.

Quoted 37 lines
---
 ui/gtk-egl.c     | 2 +-
 ui/gtk-gl-area.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
ui/gtk-egl.c +1 -1
index e84431790c..557668e418 100644
@@ -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) {
ui/gtk-gl-area.c +1 -1
index 7696df1f6b..c384a1516b 100644
@@ -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) {

--
2.39.2

#2 lore raw

Hello,

Quoted 12 lines · Marc-André Lureau

On Mon, Feb 20, 2023 at 9:56 PM Erico Nunes <[email protected] <mailto:[email protected]>> wrote:

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.

Quoted 6 lines

<mailto:[email protected]>>

<mailto:[email protected]>>

Looks like this patch was never applied, could you look at it again please?

Thanks

Erico