* [PULL 0/6] Egl 20211105 patches
@ 2021-11-05 11:30 Gerd Hoffmann
2021-11-05 11:30 ` [PULL 1/6] virtio-gpu: splitting one extended mode guest fb into n-scanouts Gerd Hoffmann
` (6 more replies)
0 siblings, 7 replies; 19+ messages in thread
From: Gerd Hoffmann @ 2021-11-05 11:30 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, Michael S. Tsirkin
The following changes since commit b1fd92137e4d485adeec8e9f292f928ff335b76c:
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2021-11-03 13:07:30 -0400)
are available in the Git repository at:
git://git.kraxel.org/qemu tags/egl-20211105-pull-request
for you to fetch changes up to 1350ff156b25be65c599ecca9957ce6726c6d383:
ui/gtk-egl: blitting partial guest fb to the proper scanout surface (2021-11-05 12:29:44 +0100)
----------------------------------------------------------------
gtk: a collection of egl fixes.
----------------------------------------------------------------
Dongwon Kim (6):
virtio-gpu: splitting one extended mode guest fb into n-scanouts
ui/gtk-egl: un-tab and re-tab should destroy egl surface and context
ui/gtk-egl: make sure the right context is set as the current
ui/gtk-egl: guest fb texture needs to be regenerated when
reinitializing egl
ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
ui/gtk-egl: blitting partial guest fb to the proper scanout surface
include/hw/virtio/virtio-gpu.h | 5 +++--
include/ui/console.h | 4 ++++
hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++-
hw/display/virtio-gpu-udmabuf.c | 22 ++++++++++++++--------
hw/display/virtio-gpu.c | 4 ++--
ui/egl-helpers.c | 25 +++++++++++++++++++++----
ui/gtk-egl.c | 10 ++++++++++
ui/gtk.c | 23 +++++++++++++++++++++++
8 files changed, 79 insertions(+), 17 deletions(-)
--
2.31.1
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PULL 1/6] virtio-gpu: splitting one extended mode guest fb into n-scanouts
2021-11-05 11:30 [PULL 0/6] Egl 20211105 patches Gerd Hoffmann
@ 2021-11-05 11:30 ` Gerd Hoffmann
2021-11-05 11:30 ` [PULL 2/6] ui/gtk-egl: un-tab and re-tab should destroy egl surface and context Gerd Hoffmann
` (5 subsequent siblings)
6 siblings, 0 replies; 19+ messages in thread
From: Gerd Hoffmann @ 2021-11-05 11:30 UTC (permalink / raw)
To: qemu-devel
Cc: Dongwon Kim, Vivek Kasireddy, Gerd Hoffmann, Michael S. Tsirkin
From: Dongwon Kim <dongwon.kim@intel.com>
When guest is running Linux/X11 with extended multiple displays mode enabled,
the guest shares one scanout resource each time containing whole surface
rather than sharing individual display output separately. This extended frame
is properly splited and rendered on the corresponding scanout surfaces but
not in case of blob-resource (zero copy).
This code change lets the qemu split this one large surface data into multiple
in case of blob-resource as well so that each sub frame then can be blitted
properly to each scanout.
v2: resizing qemu console in virtio_gpu_update_dmabuf to scanout's width and
height
v3: updating stub function of virtio_gpu_update_dmabuf to match the type
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20211104065153.28897-5-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
include/hw/virtio/virtio-gpu.h | 5 +++--
include/ui/console.h | 4 ++++
hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++-
hw/display/virtio-gpu-udmabuf.c | 22 ++++++++++++++--------
hw/display/virtio-gpu.c | 4 ++--
5 files changed, 25 insertions(+), 13 deletions(-)
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 24c6628944ea..acfba7c76c10 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -187,7 +187,7 @@ struct VirtIOGPU {
struct {
QTAILQ_HEAD(, VGPUDMABuf) bufs;
- VGPUDMABuf *primary;
+ VGPUDMABuf *primary[VIRTIO_GPU_MAX_SCANOUTS];
} dmabuf;
};
@@ -273,7 +273,8 @@ void virtio_gpu_fini_udmabuf(struct virtio_gpu_simple_resource *res);
int virtio_gpu_update_dmabuf(VirtIOGPU *g,
uint32_t scanout_id,
struct virtio_gpu_simple_resource *res,
- struct virtio_gpu_framebuffer *fb);
+ struct virtio_gpu_framebuffer *fb,
+ struct virtio_gpu_rect *r);
/* virtio-gpu-3d.c */
void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
diff --git a/include/ui/console.h b/include/ui/console.h
index b6bedc5f4152..6d678924f6fd 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -167,6 +167,10 @@ typedef struct QemuDmaBuf {
uint32_t fourcc;
uint64_t modifier;
uint32_t texture;
+ uint32_t x;
+ uint32_t y;
+ uint32_t scanout_width;
+ uint32_t scanout_height;
bool y0_top;
void *sync;
int fence_fd;
diff --git a/hw/display/virtio-gpu-udmabuf-stubs.c b/hw/display/virtio-gpu-udmabuf-stubs.c
index 81f661441ab9..f692e1351034 100644
--- a/hw/display/virtio-gpu-udmabuf-stubs.c
+++ b/hw/display/virtio-gpu-udmabuf-stubs.c
@@ -20,7 +20,8 @@ void virtio_gpu_fini_udmabuf(struct virtio_gpu_simple_resource *res)
int virtio_gpu_update_dmabuf(VirtIOGPU *g,
uint32_t scanout_id,
struct virtio_gpu_simple_resource *res,
- struct virtio_gpu_framebuffer *fb)
+ struct virtio_gpu_framebuffer *fb,
+ struct virtio_gpu_rect *r)
{
/* nothing (stub) */
return 0;
diff --git a/hw/display/virtio-gpu-udmabuf.c b/hw/display/virtio-gpu-udmabuf.c
index 60ea7f8f4972..1597921c51fc 100644
--- a/hw/display/virtio-gpu-udmabuf.c
+++ b/hw/display/virtio-gpu-udmabuf.c
@@ -171,7 +171,8 @@ static VGPUDMABuf
*virtio_gpu_create_dmabuf(VirtIOGPU *g,
uint32_t scanout_id,
struct virtio_gpu_simple_resource *res,
- struct virtio_gpu_framebuffer *fb)
+ struct virtio_gpu_framebuffer *fb,
+ struct virtio_gpu_rect *r)
{
VGPUDMABuf *dmabuf;
@@ -183,6 +184,10 @@ static VGPUDMABuf
dmabuf->buf.width = fb->width;
dmabuf->buf.height = fb->height;
dmabuf->buf.stride = fb->stride;
+ dmabuf->buf.x = r->x;
+ dmabuf->buf.y = r->y;
+ dmabuf->buf.scanout_width = r->width;
+ dmabuf->buf.scanout_height = r->height;
dmabuf->buf.fourcc = qemu_pixman_to_drm_format(fb->format);
dmabuf->buf.fd = res->dmabuf_fd;
dmabuf->buf.allow_fences = true;
@@ -196,24 +201,25 @@ static VGPUDMABuf
int virtio_gpu_update_dmabuf(VirtIOGPU *g,
uint32_t scanout_id,
struct virtio_gpu_simple_resource *res,
- struct virtio_gpu_framebuffer *fb)
+ struct virtio_gpu_framebuffer *fb,
+ struct virtio_gpu_rect *r)
{
struct virtio_gpu_scanout *scanout = &g->parent_obj.scanout[scanout_id];
VGPUDMABuf *new_primary, *old_primary = NULL;
- new_primary = virtio_gpu_create_dmabuf(g, scanout_id, res, fb);
+ new_primary = virtio_gpu_create_dmabuf(g, scanout_id, res, fb, r);
if (!new_primary) {
return -EINVAL;
}
- if (g->dmabuf.primary) {
- old_primary = g->dmabuf.primary;
+ if (g->dmabuf.primary[scanout_id]) {
+ old_primary = g->dmabuf.primary[scanout_id];
}
- g->dmabuf.primary = new_primary;
+ g->dmabuf.primary[scanout_id] = new_primary;
qemu_console_resize(scanout->con,
- new_primary->buf.width,
- new_primary->buf.height);
+ new_primary->buf.scanout_width,
+ new_primary->buf.scanout_height);
dpy_gl_scanout_dmabuf(scanout->con, &new_primary->buf);
if (old_primary) {
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index 182e0868b09d..d78b9700c7de 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -517,9 +517,9 @@ static void virtio_gpu_resource_flush(VirtIOGPU *g,
console_has_gl(scanout->con)) {
dpy_gl_update(scanout->con, 0, 0, scanout->width,
scanout->height);
- return;
}
}
+ return;
}
if (!res->blob &&
@@ -627,7 +627,7 @@ static void virtio_gpu_do_set_scanout(VirtIOGPU *g,
if (res->blob) {
if (console_has_gl(scanout->con)) {
- if (!virtio_gpu_update_dmabuf(g, scanout_id, res, fb)) {
+ if (!virtio_gpu_update_dmabuf(g, scanout_id, res, fb, r)) {
virtio_gpu_update_scanout(g, scanout_id, res, r);
return;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PULL 2/6] ui/gtk-egl: un-tab and re-tab should destroy egl surface and context
2021-11-05 11:30 [PULL 0/6] Egl 20211105 patches Gerd Hoffmann
2021-11-05 11:30 ` [PULL 1/6] virtio-gpu: splitting one extended mode guest fb into n-scanouts Gerd Hoffmann
@ 2021-11-05 11:30 ` Gerd Hoffmann
2021-11-05 11:30 ` [PULL 3/6] ui/gtk-egl: make sure the right context is set as the current Gerd Hoffmann
` (4 subsequent siblings)
6 siblings, 0 replies; 19+ messages in thread
From: Gerd Hoffmann @ 2021-11-05 11:30 UTC (permalink / raw)
To: qemu-devel
Cc: Khairul Anuar Romli, Dongwon Kim, Gerd Hoffmann, Michael S. Tsirkin
From: Dongwon Kim <dongwon.kim@intel.com>
An old esurface should be destroyed and set to be NULL when doing
un-tab and re-tab so that a new esurface an context can be created
for the window widget that those will be bound to.
v2: enabling opengl specific routines only when CONFIG_OPENGL is set
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Khairul Anuar Romli <khairul.anuar.romli@intel.com>
Message-Id: <20211104065153.28897-1-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/gtk.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index b0564d80c191..8da673c18c72 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1242,6 +1242,16 @@ static gboolean gd_tab_window_close(GtkWidget *widget, GdkEvent *event,
vc->tab_item, vc->label);
gtk_widget_destroy(vc->window);
vc->window = NULL;
+#if defined(CONFIG_OPENGL)
+ if (vc->gfx.esurface) {
+ eglDestroySurface(qemu_egl_display, vc->gfx.esurface);
+ vc->gfx.esurface = NULL;
+ }
+ if (vc->gfx.ectx) {
+ eglDestroyContext(qemu_egl_display, vc->gfx.ectx);
+ vc->gfx.ectx = NULL;
+ }
+#endif
return TRUE;
}
@@ -1271,6 +1281,16 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque)
if (!vc->window) {
gtk_widget_set_sensitive(vc->menu_item, false);
vc->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+#if defined(CONFIG_OPENGL)
+ if (vc->gfx.esurface) {
+ eglDestroySurface(qemu_egl_display, vc->gfx.esurface);
+ vc->gfx.esurface = NULL;
+ }
+ if (vc->gfx.esurface) {
+ eglDestroyContext(qemu_egl_display, vc->gfx.ectx);
+ vc->gfx.ectx = NULL;
+ }
+#endif
gd_widget_reparent(s->notebook, vc->window, vc->tab_item);
g_signal_connect(vc->window, "delete-event",
--
2.31.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PULL 3/6] ui/gtk-egl: make sure the right context is set as the current
2021-11-05 11:30 [PULL 0/6] Egl 20211105 patches Gerd Hoffmann
2021-11-05 11:30 ` [PULL 1/6] virtio-gpu: splitting one extended mode guest fb into n-scanouts Gerd Hoffmann
2021-11-05 11:30 ` [PULL 2/6] ui/gtk-egl: un-tab and re-tab should destroy egl surface and context Gerd Hoffmann
@ 2021-11-05 11:30 ` Gerd Hoffmann
2021-11-05 11:30 ` [PULL 4/6] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl Gerd Hoffmann
` (3 subsequent siblings)
6 siblings, 0 replies; 19+ messages in thread
From: Gerd Hoffmann @ 2021-11-05 11:30 UTC (permalink / raw)
To: qemu-devel; +Cc: Dongwon Kim, Gerd Hoffmann, Michael S. Tsirkin
From: Dongwon Kim <dongwon.kim@intel.com>
Making the vc->gfx.ectx current before handling texture
associated with it
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20211104065153.28897-2-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/gtk-egl.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index e912b200755a..21649950983f 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -152,6 +152,7 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
}
vc->gfx.gls = qemu_gl_init_shader();
if (vc->gfx.ds) {
+ surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
}
}
@@ -178,6 +179,8 @@ void gd_egl_switch(DisplayChangeListener *dcl,
surface_height(vc->gfx.ds) == surface_height(surface)) {
resized = false;
}
+ eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
+ vc->gfx.esurface, vc->gfx.ectx);
surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
vc->gfx.ds = surface;
@@ -237,6 +240,9 @@ void gd_egl_scanout_dmabuf(DisplayChangeListener *dcl,
#ifdef CONFIG_GBM
VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
+ eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
+ vc->gfx.esurface, vc->gfx.ectx);
+
egl_dmabuf_import_texture(dmabuf);
if (!dmabuf->texture) {
return;
--
2.31.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PULL 4/6] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl
2021-11-05 11:30 [PULL 0/6] Egl 20211105 patches Gerd Hoffmann
` (2 preceding siblings ...)
2021-11-05 11:30 ` [PULL 3/6] ui/gtk-egl: make sure the right context is set as the current Gerd Hoffmann
@ 2021-11-05 11:30 ` Gerd Hoffmann
2021-11-06 20:32 ` Laurent Vivier
2021-11-05 11:30 ` [PULL 5/6] ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound Gerd Hoffmann
` (2 subsequent siblings)
6 siblings, 1 reply; 19+ messages in thread
From: Gerd Hoffmann @ 2021-11-05 11:30 UTC (permalink / raw)
To: qemu-devel; +Cc: Dongwon Kim, Gerd Hoffmann, Michael S. Tsirkin
From: Dongwon Kim <dongwon.kim@intel.com>
If guest fb is backed by dmabuf (blob-resource), the texture bound to the
old context needs to be recreated in case the egl is re-initialized (e.g.
new window for vc is created in case of detaching/reattaching of the tab)
v2: call egl_dmabuf_release_texutre instead of putting 0 to dmabuf->texture
(Vivek Kasireddy)
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20211104065153.28897-3-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/gtk-egl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index 21649950983f..f2026e4b5c9b 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -155,6 +155,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
}
+ if (vc->gfx.guest_fb.dmabuf) {
+ egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
+ gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
+ }
}
graphic_hw_update(dcl->con);
--
2.31.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PULL 5/6] ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
2021-11-05 11:30 [PULL 0/6] Egl 20211105 patches Gerd Hoffmann
` (3 preceding siblings ...)
2021-11-05 11:30 ` [PULL 4/6] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl Gerd Hoffmann
@ 2021-11-05 11:30 ` Gerd Hoffmann
2021-11-05 11:30 ` [PULL 6/6] ui/gtk-egl: blitting partial guest fb to the proper scanout surface Gerd Hoffmann
2021-11-05 17:13 ` [PULL 0/6] Egl 20211105 patches Richard Henderson
6 siblings, 0 replies; 19+ messages in thread
From: Gerd Hoffmann @ 2021-11-05 11:30 UTC (permalink / raw)
To: qemu-devel; +Cc: Dongwon Kim, Gerd Hoffmann, Michael S. Tsirkin
From: Dongwon Kim <dongwon.kim@intel.com>
gd_draw_event shouldn't try to repaint if surface does not exist
for the VC.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20211104065153.28897-4-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/gtk.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index 8da673c18c72..d2892ea6b4a9 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -778,6 +778,9 @@ static gboolean gd_draw_event(GtkWidget *widget, cairo_t *cr, void *opaque)
if (!vc->gfx.ds) {
return FALSE;
}
+ if (!vc->gfx.surface) {
+ return FALSE;
+ }
vc->gfx.dcl.update_interval =
gd_monitor_update_interval(vc->window ? vc->window : s->window);
--
2.31.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PULL 6/6] ui/gtk-egl: blitting partial guest fb to the proper scanout surface
2021-11-05 11:30 [PULL 0/6] Egl 20211105 patches Gerd Hoffmann
` (4 preceding siblings ...)
2021-11-05 11:30 ` [PULL 5/6] ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound Gerd Hoffmann
@ 2021-11-05 11:30 ` Gerd Hoffmann
2021-11-05 17:13 ` [PULL 0/6] Egl 20211105 patches Richard Henderson
6 siblings, 0 replies; 19+ messages in thread
From: Gerd Hoffmann @ 2021-11-05 11:30 UTC (permalink / raw)
To: qemu-devel
Cc: Dongwon Kim, Vivek Kasireddy, Gerd Hoffmann, Michael S. Tsirkin
From: Dongwon Kim <dongwon.kim@intel.com>
eb_fb_blit should be able to blit partial image of guest display (blob res)
in case multiple displays are configured for the guest and they are set as extended-
desktop mode.
v2: egl_fb includes dmabuf info then make egl_fb_blit position and size
parameters programmed in dmabuf structure (previously position/size
parameters were given to egl_fb_blit separately)
(Vivek Kasireddy)
changed the commit message as there is no interface change to egl_fb_blit
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20211104065153.28897-6-dongwon.kim@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/egl-helpers.c | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c
index 385a3fa75223..3a88245b6780 100644
--- a/ui/egl-helpers.c
+++ b/ui/egl-helpers.c
@@ -90,14 +90,31 @@ void egl_fb_setup_new_tex(egl_fb *fb, int width, int height)
void egl_fb_blit(egl_fb *dst, egl_fb *src, bool flip)
{
- GLuint y1, y2;
+ GLuint x1 = 0;
+ GLuint y1 = 0;
+ GLuint x2, y2;
+ GLuint w = src->width;
+ GLuint h = src->height;
glBindFramebuffer(GL_READ_FRAMEBUFFER, src->framebuffer);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, dst->framebuffer);
glViewport(0, 0, dst->width, dst->height);
- y1 = flip ? src->height : 0;
- y2 = flip ? 0 : src->height;
- glBlitFramebuffer(0, y1, src->width, y2,
+
+ if (src->dmabuf) {
+ x1 = src->dmabuf->x;
+ y1 = src->dmabuf->y;
+ w = src->dmabuf->scanout_width;
+ h = src->dmabuf->scanout_height;
+ }
+
+ w = (x1 + w) > src->width ? src->width - x1 : w;
+ h = (y1 + h) > src->height ? src->height - y1 : h;
+
+ y2 = flip ? y1 : h + y1;
+ y1 = flip ? h + y1 : y1;
+ x2 = x1 + w;
+
+ glBlitFramebuffer(x1, y1, x2, y2,
0, 0, dst->width, dst->height,
GL_COLOR_BUFFER_BIT, GL_LINEAR);
}
--
2.31.1
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PULL 0/6] Egl 20211105 patches
2021-11-05 11:30 [PULL 0/6] Egl 20211105 patches Gerd Hoffmann
` (5 preceding siblings ...)
2021-11-05 11:30 ` [PULL 6/6] ui/gtk-egl: blitting partial guest fb to the proper scanout surface Gerd Hoffmann
@ 2021-11-05 17:13 ` Richard Henderson
2021-11-05 18:26 ` Philippe Mathieu-Daudé
6 siblings, 1 reply; 19+ messages in thread
From: Richard Henderson @ 2021-11-05 17:13 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel; +Cc: Michael S. Tsirkin
On 11/5/21 7:30 AM, Gerd Hoffmann wrote:
> The following changes since commit b1fd92137e4d485adeec8e9f292f928ff335b76c:
>
> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2021-11-03 13:07:30 -0400)
>
> are available in the Git repository at:
>
> git://git.kraxel.org/qemu tags/egl-20211105-pull-request
>
> for you to fetch changes up to 1350ff156b25be65c599ecca9957ce6726c6d383:
>
> ui/gtk-egl: blitting partial guest fb to the proper scanout surface (2021-11-05 12:29:44 +0100)
>
> ----------------------------------------------------------------
> gtk: a collection of egl fixes.
>
> ----------------------------------------------------------------
>
> Dongwon Kim (6):
> virtio-gpu: splitting one extended mode guest fb into n-scanouts
> ui/gtk-egl: un-tab and re-tab should destroy egl surface and context
> ui/gtk-egl: make sure the right context is set as the current
> ui/gtk-egl: guest fb texture needs to be regenerated when
> reinitializing egl
> ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
> ui/gtk-egl: blitting partial guest fb to the proper scanout surface
>
> include/hw/virtio/virtio-gpu.h | 5 +++--
> include/ui/console.h | 4 ++++
> hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++-
> hw/display/virtio-gpu-udmabuf.c | 22 ++++++++++++++--------
> hw/display/virtio-gpu.c | 4 ++--
> ui/egl-helpers.c | 25 +++++++++++++++++++++----
> ui/gtk-egl.c | 10 ++++++++++
> ui/gtk.c | 23 +++++++++++++++++++++++
> 8 files changed, 79 insertions(+), 17 deletions(-)
Applied, thanks.
r~
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PULL 0/6] Egl 20211105 patches
2021-11-05 17:13 ` [PULL 0/6] Egl 20211105 patches Richard Henderson
@ 2021-11-05 18:26 ` Philippe Mathieu-Daudé
2021-11-05 18:49 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 19+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-05 18:26 UTC (permalink / raw)
To: Gerd Hoffmann, Dongwon Kim
Cc: Richard Henderson, qemu-devel, Michael S. Tsirkin
On 11/5/21 18:13, Richard Henderson wrote:
> On 11/5/21 7:30 AM, Gerd Hoffmann wrote:
>> The following changes since commit
>> b1fd92137e4d485adeec8e9f292f928ff335b76c:
>>
>> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream'
>> into staging (2021-11-03 13:07:30 -0400)
>>
>> are available in the Git repository at:
>>
>> git://git.kraxel.org/qemu tags/egl-20211105-pull-request
>>
>> for you to fetch changes up to 1350ff156b25be65c599ecca9957ce6726c6d383:
>>
>> ui/gtk-egl: blitting partial guest fb to the proper scanout surface
>> (2021-11-05 12:29:44 +0100)
>>
>> ----------------------------------------------------------------
>> gtk: a collection of egl fixes.
>>
>> ----------------------------------------------------------------
>>
>> Dongwon Kim (6):
>> virtio-gpu: splitting one extended mode guest fb into n-scanouts
>> ui/gtk-egl: un-tab and re-tab should destroy egl surface and context
>> ui/gtk-egl: make sure the right context is set as the current
>> ui/gtk-egl: guest fb texture needs to be regenerated when
>> reinitializing egl
>> ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
>> ui/gtk-egl: blitting partial guest fb to the proper scanout surface
>>
>> include/hw/virtio/virtio-gpu.h | 5 +++--
>> include/ui/console.h | 4 ++++
>> hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++-
>> hw/display/virtio-gpu-udmabuf.c | 22 ++++++++++++++--------
>> hw/display/virtio-gpu.c | 4 ++--
>> ui/egl-helpers.c | 25 +++++++++++++++++++++----
>> ui/gtk-egl.c | 10 ++++++++++
>> ui/gtk.c | 23 +++++++++++++++++++++++
>> 8 files changed, 79 insertions(+), 17 deletions(-)
>
> Applied, thanks.
Ubuntu 18.04.4 LTS:
ui/gtk-egl.c:159:13: error: implicit declaration of function
'egl_dmabuf_release_texture' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
^
ui/gtk-egl.c:159:13: error: this function declaration is not a prototype
[-Werror,-Wstrict-prototypes]
2 errors generated.
https://app.travis-ci.com/gitlab/qemu-project/qemu/builds/241272737
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PULL 0/6] Egl 20211105 patches
2021-11-05 18:26 ` Philippe Mathieu-Daudé
@ 2021-11-05 18:49 ` Philippe Mathieu-Daudé
2021-11-08 8:12 ` Mark Cave-Ayland
0 siblings, 1 reply; 19+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-05 18:49 UTC (permalink / raw)
To: Gerd Hoffmann, Dongwon Kim
Cc: Richard Henderson, qemu-devel, Michael S. Tsirkin
On 11/5/21 19:26, Philippe Mathieu-Daudé wrote:
> On 11/5/21 18:13, Richard Henderson wrote:
>> On 11/5/21 7:30 AM, Gerd Hoffmann wrote:
>>> The following changes since commit
>>> b1fd92137e4d485adeec8e9f292f928ff335b76c:
>>>
>>> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream'
>>> into staging (2021-11-03 13:07:30 -0400)
>>>
>>> are available in the Git repository at:
>>>
>>> git://git.kraxel.org/qemu tags/egl-20211105-pull-request
>>>
>>> for you to fetch changes up to 1350ff156b25be65c599ecca9957ce6726c6d383:
>>>
>>> ui/gtk-egl: blitting partial guest fb to the proper scanout surface
>>> (2021-11-05 12:29:44 +0100)
>>>
>>> ----------------------------------------------------------------
>>> gtk: a collection of egl fixes.
>>>
>>> ----------------------------------------------------------------
>>>
>>> Dongwon Kim (6):
>>> virtio-gpu: splitting one extended mode guest fb into n-scanouts
>>> ui/gtk-egl: un-tab and re-tab should destroy egl surface and context
>>> ui/gtk-egl: make sure the right context is set as the current
>>> ui/gtk-egl: guest fb texture needs to be regenerated when
>>> reinitializing egl
>>> ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
>>> ui/gtk-egl: blitting partial guest fb to the proper scanout surface
>>>
>>> include/hw/virtio/virtio-gpu.h | 5 +++--
>>> include/ui/console.h | 4 ++++
>>> hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++-
>>> hw/display/virtio-gpu-udmabuf.c | 22 ++++++++++++++--------
>>> hw/display/virtio-gpu.c | 4 ++--
>>> ui/egl-helpers.c | 25 +++++++++++++++++++++----
>>> ui/gtk-egl.c | 10 ++++++++++
>>> ui/gtk.c | 23 +++++++++++++++++++++++
>>> 8 files changed, 79 insertions(+), 17 deletions(-)
>>
>> Applied, thanks.
>
> Ubuntu 18.04.4 LTS:
>
> ui/gtk-egl.c:159:13: error: implicit declaration of function
> 'egl_dmabuf_release_texture' is invalid in C99
> [-Werror,-Wimplicit-function-declaration]
> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
> ^
> ui/gtk-egl.c:159:13: error: this function declaration is not a prototype
> [-Werror,-Wstrict-prototypes]
> 2 errors generated.
>
> https://app.travis-ci.com/gitlab/qemu-project/qemu/builds/241272737
>
This seems to fix but I have no clue whether it is correct:
-- >8 --
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index f2026e4b5c9..45cb67712df 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -156,8 +156,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
}
+#ifdef CONFIG_GBM
if (vc->gfx.guest_fb.dmabuf) {
egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
}
+#endif
}
---
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PULL 4/6] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl
2021-11-05 11:30 ` [PULL 4/6] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl Gerd Hoffmann
@ 2021-11-06 20:32 ` Laurent Vivier
2021-11-08 8:07 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 19+ messages in thread
From: Laurent Vivier @ 2021-11-06 20:32 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel; +Cc: Dongwon Kim, Michael S. Tsirkin
Le 05/11/2021 à 12:30, Gerd Hoffmann a écrit :
> From: Dongwon Kim <dongwon.kim@intel.com>
>
> If guest fb is backed by dmabuf (blob-resource), the texture bound to the
> old context needs to be recreated in case the egl is re-initialized (e.g.
> new window for vc is created in case of detaching/reattaching of the tab)
>
> v2: call egl_dmabuf_release_texutre instead of putting 0 to dmabuf->texture
> (Vivek Kasireddy)
>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
> Message-Id: <20211104065153.28897-3-dongwon.kim@intel.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> ui/gtk-egl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
> index 21649950983f..f2026e4b5c9b 100644
> --- a/ui/gtk-egl.c
> +++ b/ui/gtk-egl.c
> @@ -155,6 +155,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
> surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
> surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
> }
> + if (vc->gfx.guest_fb.dmabuf) {
> + egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
> + gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
> + }
> }
>
> graphic_hw_update(dcl->con);
>
This patch breaks something:
$ .../configure' '--target-list=m68k-softmmu' '--enable-virglrenderer'
$ make
...
FAILED: libcommon.fa.p/ui_gtk-egl.c.o
cc -m64 -mcx16 -Ilibcommon.fa.p -I../../../Projects/qemu-next/capstone/include/capstone
-I../../../Projects/qemu-next/dtc/libfdt -I../../../Projects/qemu-next/slirp
-I../../../Projects/qemu-next/slirp/src -I/usr/include/pixman-1 -I/usr/include/libpng16
-I/usr/include/p11-kit-1 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/sysprof-4 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0
-I/usr/include/virgl -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz
-I/usr/include/freetype2 -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/cairo
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cloudproviders -I/usr/include/atk-1.0
-I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include
-I/usr/include/at-spi-2.0 -I/usr/include/vte-2.91 -fdiagnostics-color=auto -Wall -Winvalid-pch
-Werror -std=gnu11 -O2 -g -isystem /home/laurent/Projects/qemu-next/linux-headers -isystem
linux-headers -iquote . -iquote /home/laurent/Projects/qemu-next -iquote
/home/laurent/Projects/qemu-next/include -iquote /home/laurent/Projects/qemu-next/disas/libvixl
-iquote /home/laurent/Projects/qemu-next/tcg/i386 -pthread -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls
-Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv
-Wold-style-declaration -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k
-Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined
-Wimplicit-fallthrough=2 -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi
-fstack-protector-strong -fPIE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR -D_REENTRANT
-MD -MQ libcommon.fa.p/ui_gtk-egl.c.o -MF libcommon.fa.p/ui_gtk-egl.c.o.d -o
libcommon.fa.p/ui_gtk-egl.c.o -c ../../../Projects/qemu-next/ui/gtk-egl.c
../../../Projects/qemu-next/ui/gtk-egl.c: In function 'gd_egl_refresh':
../../../Projects/qemu-next/ui/gtk-egl.c:159:13: error: implicit declaration of function
'egl_dmabuf_release_texture' [-Werror=implicit-function-declaration]
159 | egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../../Projects/qemu-next/ui/gtk-egl.c:159:13: error: nested extern declaration of
'egl_dmabuf_release_texture' [-Werror=nested-externs]
I think we need something like:
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index f2026e4b5c9b..45cb67712df0 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -155,10 +155,12 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
}
+#ifdef CONFIG_GBM
if (vc->gfx.guest_fb.dmabuf) {
egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
}
+#endif
}
graphic_hw_update(dcl->con);
Thanks,
Laurent
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PULL 4/6] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl
2021-11-06 20:32 ` Laurent Vivier
@ 2021-11-08 8:07 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 19+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-08 8:07 UTC (permalink / raw)
To: Laurent Vivier, Gerd Hoffmann, qemu-devel; +Cc: Dongwon Kim, Michael S. Tsirkin
On 11/6/21 21:32, Laurent Vivier wrote:
> Le 05/11/2021 à 12:30, Gerd Hoffmann a écrit :
>> From: Dongwon Kim <dongwon.kim@intel.com>
>>
>> If guest fb is backed by dmabuf (blob-resource), the texture bound to the
>> old context needs to be recreated in case the egl is re-initialized (e.g.
>> new window for vc is created in case of detaching/reattaching of the tab)
>>
>> v2: call egl_dmabuf_release_texutre instead of putting 0 to
>> dmabuf->texture
>> (Vivek Kasireddy)
>>
>> Cc: Gerd Hoffmann <kraxel@redhat.com>
>> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
>> Message-Id: <20211104065153.28897-3-dongwon.kim@intel.com>
>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>> ---
>> ui/gtk-egl.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
>> index 21649950983f..f2026e4b5c9b 100644
>> --- a/ui/gtk-egl.c
>> +++ b/ui/gtk-egl.c
>> @@ -155,6 +155,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
>> surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
>> surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
>> }
>> + if (vc->gfx.guest_fb.dmabuf) {
>> + egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
>> + gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
>> + }
>> }
>> graphic_hw_update(dcl->con);
>>
>
> This patch breaks something:
>
> $ .../configure' '--target-list=m68k-softmmu' '--enable-virglrenderer'
> $ make
> ...
>
> FAILED: libcommon.fa.p/ui_gtk-egl.c.o
> cc -m64 -mcx16 -Ilibcommon.fa.p
> -I../../../Projects/qemu-next/capstone/include/capstone
> -I../../../Projects/qemu-next/dtc/libfdt
> -I../../../Projects/qemu-next/slirp
> -I../../../Projects/qemu-next/slirp/src -I/usr/include/pixman-1
> -I/usr/include/libpng16 -I/usr/include/p11-kit-1 -I/usr/include/glib-2.0
> -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4
> -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0
> -I/usr/include/virgl -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0
> -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/fribidi
> -I/usr/include/libxml2 -I/usr/include/cairo
> -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cloudproviders
> -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0
> -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include
> -I/usr/include/at-spi-2.0 -I/usr/include/vte-2.91
> -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g
> -isystem /home/laurent/Projects/qemu-next/linux-headers -isystem
> linux-headers -iquote . -iquote /home/laurent/Projects/qemu-next -iquote
> /home/laurent/Projects/qemu-next/include -iquote
> /home/laurent/Projects/qemu-next/disas/libvixl -iquote
> /home/laurent/Projects/qemu-next/tcg/i386 -pthread -U_FORTIFY_SOURCE
> -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
> -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wundef
> -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common
> -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits
> -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers
> -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined
> -Wimplicit-fallthrough=2 -Wno-missing-include-dirs
> -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong -fPIE
> -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR -D_REENTRANT
> -MD -MQ libcommon.fa.p/ui_gtk-egl.c.o -MF
> libcommon.fa.p/ui_gtk-egl.c.o.d -o libcommon.fa.p/ui_gtk-egl.c.o -c
> ../../../Projects/qemu-next/ui/gtk-egl.c
> ../../../Projects/qemu-next/ui/gtk-egl.c: In function 'gd_egl_refresh':
> ../../../Projects/qemu-next/ui/gtk-egl.c:159:13: error: implicit
> declaration of function 'egl_dmabuf_release_texture'
> [-Werror=implicit-function-declaration]
> 159 | egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~
> ../../../Projects/qemu-next/ui/gtk-egl.c:159:13: error: nested extern
> declaration of 'egl_dmabuf_release_texture' [-Werror=nested-externs]
>
> I think we need something like:
>
> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
> index f2026e4b5c9b..45cb67712df0 100644
> --- a/ui/gtk-egl.c
> +++ b/ui/gtk-egl.c
> @@ -155,10 +155,12 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
> surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
> surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
> }
> +#ifdef CONFIG_GBM
> if (vc->gfx.guest_fb.dmabuf) {
> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
> gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
> }
> +#endif
> }
>
> graphic_hw_update(dcl->con);
Yes, I reached to the same conclusion:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg850166.html
It would be nice to get this fixed (single buildfix patch?)
before the rc0 tag. Dongwon, could you send a patch?
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PULL 0/6] Egl 20211105 patches
2021-11-05 18:49 ` Philippe Mathieu-Daudé
@ 2021-11-08 8:12 ` Mark Cave-Ayland
2021-11-08 8:17 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 19+ messages in thread
From: Mark Cave-Ayland @ 2021-11-08 8:12 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Gerd Hoffmann, Dongwon Kim
Cc: Richard Henderson, qemu-devel, Michael S. Tsirkin
On 05/11/2021 18:49, Philippe Mathieu-Daudé wrote:
> On 11/5/21 19:26, Philippe Mathieu-Daudé wrote:
>> On 11/5/21 18:13, Richard Henderson wrote:
>>> On 11/5/21 7:30 AM, Gerd Hoffmann wrote:
>>>> The following changes since commit
>>>> b1fd92137e4d485adeec8e9f292f928ff335b76c:
>>>>
>>>> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream'
>>>> into staging (2021-11-03 13:07:30 -0400)
>>>>
>>>> are available in the Git repository at:
>>>>
>>>> git://git.kraxel.org/qemu tags/egl-20211105-pull-request
>>>>
>>>> for you to fetch changes up to 1350ff156b25be65c599ecca9957ce6726c6d383:
>>>>
>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout surface
>>>> (2021-11-05 12:29:44 +0100)
>>>>
>>>> ----------------------------------------------------------------
>>>> gtk: a collection of egl fixes.
>>>>
>>>> ----------------------------------------------------------------
>>>>
>>>> Dongwon Kim (6):
>>>> virtio-gpu: splitting one extended mode guest fb into n-scanouts
>>>> ui/gtk-egl: un-tab and re-tab should destroy egl surface and context
>>>> ui/gtk-egl: make sure the right context is set as the current
>>>> ui/gtk-egl: guest fb texture needs to be regenerated when
>>>> reinitializing egl
>>>> ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout surface
>>>>
>>>> include/hw/virtio/virtio-gpu.h | 5 +++--
>>>> include/ui/console.h | 4 ++++
>>>> hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++-
>>>> hw/display/virtio-gpu-udmabuf.c | 22 ++++++++++++++--------
>>>> hw/display/virtio-gpu.c | 4 ++--
>>>> ui/egl-helpers.c | 25 +++++++++++++++++++++----
>>>> ui/gtk-egl.c | 10 ++++++++++
>>>> ui/gtk.c | 23 +++++++++++++++++++++++
>>>> 8 files changed, 79 insertions(+), 17 deletions(-)
>>>
>>> Applied, thanks.
>>
>> Ubuntu 18.04.4 LTS:
>>
>> ui/gtk-egl.c:159:13: error: implicit declaration of function
>> 'egl_dmabuf_release_texture' is invalid in C99
>> [-Werror,-Wimplicit-function-declaration]
>> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
>> ^
>> ui/gtk-egl.c:159:13: error: this function declaration is not a prototype
>> [-Werror,-Wstrict-prototypes]
>> 2 errors generated.
>>
>> https://app.travis-ci.com/gitlab/qemu-project/qemu/builds/241272737
>>
>
> This seems to fix but I have no clue whether it is correct:
>
> -- >8 --
> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
> index f2026e4b5c9..45cb67712df 100644
> --- a/ui/gtk-egl.c
> +++ b/ui/gtk-egl.c
> @@ -156,8 +156,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
> surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
> }
> +#ifdef CONFIG_GBM
> if (vc->gfx.guest_fb.dmabuf) {
> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
> gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
> }
> +#endif
> }
>
> ---
I see the same error here trying to build QEMU git master on Debian Buster
(oldstable). The fix looks reasonable to me in that it matches the CONFIG_GBM guards
around other similar functions and the resulting binary appears to work, so:
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
ATB,
Mark.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PULL 0/6] Egl 20211105 patches
2021-11-08 8:12 ` Mark Cave-Ayland
@ 2021-11-08 8:17 ` Philippe Mathieu-Daudé
2021-11-08 9:22 ` Daniel P. Berrangé
0 siblings, 1 reply; 19+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-08 8:17 UTC (permalink / raw)
To: Mark Cave-Ayland, Gerd Hoffmann, Dongwon Kim, Thomas Huth,
Daniel P . Berrange
Cc: Laurent Vivier, Richard Henderson, qemu-devel, Michael S. Tsirkin
+Thomas & Daniel for Travis-CI
On 11/8/21 09:12, Mark Cave-Ayland wrote:
> On 05/11/2021 18:49, Philippe Mathieu-Daudé wrote:
>> On 11/5/21 19:26, Philippe Mathieu-Daudé wrote:
>>> On 11/5/21 18:13, Richard Henderson wrote:
>>>> On 11/5/21 7:30 AM, Gerd Hoffmann wrote:
>>>>> The following changes since commit
>>>>> b1fd92137e4d485adeec8e9f292f928ff335b76c:
>>>>>
>>>>> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream'
>>>>> into staging (2021-11-03 13:07:30 -0400)
>>>>>
>>>>> are available in the Git repository at:
>>>>>
>>>>> git://git.kraxel.org/qemu tags/egl-20211105-pull-request
>>>>>
>>>>> for you to fetch changes up to
>>>>> 1350ff156b25be65c599ecca9957ce6726c6d383:
>>>>>
>>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout
>>>>> surface
>>>>> (2021-11-05 12:29:44 +0100)
>>>>>
>>>>> ----------------------------------------------------------------
>>>>> gtk: a collection of egl fixes.
>>>>>
>>>>> ----------------------------------------------------------------
>>>>>
>>>>> Dongwon Kim (6):
>>>>> virtio-gpu: splitting one extended mode guest fb into n-scanouts
>>>>> ui/gtk-egl: un-tab and re-tab should destroy egl surface and
>>>>> context
>>>>> ui/gtk-egl: make sure the right context is set as the current
>>>>> ui/gtk-egl: guest fb texture needs to be regenerated when
>>>>> reinitializing egl
>>>>> ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
>>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout
>>>>> surface
>>>>>
>>>>> include/hw/virtio/virtio-gpu.h | 5 +++--
>>>>> include/ui/console.h | 4 ++++
>>>>> hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++-
>>>>> hw/display/virtio-gpu-udmabuf.c | 22 ++++++++++++++--------
>>>>> hw/display/virtio-gpu.c | 4 ++--
>>>>> ui/egl-helpers.c | 25
>>>>> +++++++++++++++++++++----
>>>>> ui/gtk-egl.c | 10 ++++++++++
>>>>> ui/gtk.c | 23 +++++++++++++++++++++++
>>>>> 8 files changed, 79 insertions(+), 17 deletions(-)
>>>>
>>>> Applied, thanks.
>>>
>>> Ubuntu 18.04.4 LTS:
>>>
>>> ui/gtk-egl.c:159:13: error: implicit declaration of function
>>> 'egl_dmabuf_release_texture' is invalid in C99
>>> [-Werror,-Wimplicit-function-declaration]
>>> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
>>> ^
>>> ui/gtk-egl.c:159:13: error: this function declaration is not a prototype
>>> [-Werror,-Wstrict-prototypes]
>>> 2 errors generated.
>>>
>>> https://app.travis-ci.com/gitlab/qemu-project/qemu/builds/241272737
>>>
>>
>> This seems to fix but I have no clue whether it is correct:
>>
>> -- >8 --
>> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
>> index f2026e4b5c9..45cb67712df 100644
>> --- a/ui/gtk-egl.c
>> +++ b/ui/gtk-egl.c
>> @@ -156,8 +156,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
>> surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
>> }
>> +#ifdef CONFIG_GBM
>> if (vc->gfx.guest_fb.dmabuf) {
>> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
>> gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
>> }
>> +#endif
>> }
>>
>> ---
>
> I see the same error here trying to build QEMU git master on Debian
> Buster (oldstable). The fix looks reasonable to me in that it matches
> the CONFIG_GBM guards around other similar functions and the resulting
> binary appears to work, so:
>
> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Thank you, I'll post a formal patch then.
I wonder why this got merged while this configuration is covered in
Travis-CI. Is it that we have a too high failure rate than we don't
use it anymore?
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PULL 0/6] Egl 20211105 patches
2021-11-08 8:17 ` Philippe Mathieu-Daudé
@ 2021-11-08 9:22 ` Daniel P. Berrangé
2021-11-08 9:36 ` Gerd Hoffmann
` (2 more replies)
0 siblings, 3 replies; 19+ messages in thread
From: Daniel P. Berrangé @ 2021-11-08 9:22 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Thomas Huth, Dongwon Kim, Michael S. Tsirkin, Mark Cave-Ayland,
Richard Henderson, qemu-devel, Laurent Vivier, Gerd Hoffmann
On Mon, Nov 08, 2021 at 09:17:19AM +0100, Philippe Mathieu-Daudé wrote:
> +Thomas & Daniel for Travis-CI
>
> On 11/8/21 09:12, Mark Cave-Ayland wrote:
> > On 05/11/2021 18:49, Philippe Mathieu-Daudé wrote:
> >> On 11/5/21 19:26, Philippe Mathieu-Daudé wrote:
> >>> On 11/5/21 18:13, Richard Henderson wrote:
> >>>> On 11/5/21 7:30 AM, Gerd Hoffmann wrote:
> >>>>> The following changes since commit
> >>>>> b1fd92137e4d485adeec8e9f292f928ff335b76c:
> >>>>>
> >>>>> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream'
> >>>>> into staging (2021-11-03 13:07:30 -0400)
> >>>>>
> >>>>> are available in the Git repository at:
> >>>>>
> >>>>> git://git.kraxel.org/qemu tags/egl-20211105-pull-request
> >>>>>
> >>>>> for you to fetch changes up to
> >>>>> 1350ff156b25be65c599ecca9957ce6726c6d383:
> >>>>>
> >>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout
> >>>>> surface
> >>>>> (2021-11-05 12:29:44 +0100)
> >>>>>
> >>>>> ----------------------------------------------------------------
> >>>>> gtk: a collection of egl fixes.
> >>>>>
> >>>>> ----------------------------------------------------------------
> >>>>>
> >>>>> Dongwon Kim (6):
> >>>>> virtio-gpu: splitting one extended mode guest fb into n-scanouts
> >>>>> ui/gtk-egl: un-tab and re-tab should destroy egl surface and
> >>>>> context
> >>>>> ui/gtk-egl: make sure the right context is set as the current
> >>>>> ui/gtk-egl: guest fb texture needs to be regenerated when
> >>>>> reinitializing egl
> >>>>> ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
> >>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout
> >>>>> surface
> >>>>>
> >>>>> include/hw/virtio/virtio-gpu.h | 5 +++--
> >>>>> include/ui/console.h | 4 ++++
> >>>>> hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++-
> >>>>> hw/display/virtio-gpu-udmabuf.c | 22 ++++++++++++++--------
> >>>>> hw/display/virtio-gpu.c | 4 ++--
> >>>>> ui/egl-helpers.c | 25
> >>>>> +++++++++++++++++++++----
> >>>>> ui/gtk-egl.c | 10 ++++++++++
> >>>>> ui/gtk.c | 23 +++++++++++++++++++++++
> >>>>> 8 files changed, 79 insertions(+), 17 deletions(-)
> >>>>
> >>>> Applied, thanks.
> >>>
> >>> Ubuntu 18.04.4 LTS:
> >>>
> >>> ui/gtk-egl.c:159:13: error: implicit declaration of function
> >>> 'egl_dmabuf_release_texture' is invalid in C99
> >>> [-Werror,-Wimplicit-function-declaration]
> >>> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
> >>> ^
> >>> ui/gtk-egl.c:159:13: error: this function declaration is not a prototype
> >>> [-Werror,-Wstrict-prototypes]
> >>> 2 errors generated.
> >>>
> >>> https://app.travis-ci.com/gitlab/qemu-project/qemu/builds/241272737
> >>>
> >>
> >> This seems to fix but I have no clue whether it is correct:
> >>
> >> -- >8 --
> >> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
> >> index f2026e4b5c9..45cb67712df 100644
> >> --- a/ui/gtk-egl.c
> >> +++ b/ui/gtk-egl.c
> >> @@ -156,8 +156,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
> >> surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
> >> }
> >> +#ifdef CONFIG_GBM
> >> if (vc->gfx.guest_fb.dmabuf) {
> >> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
> >> gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
> >> }
> >> +#endif
> >> }
> >>
> >> ---
> >
> > I see the same error here trying to build QEMU git master on Debian
> > Buster (oldstable). The fix looks reasonable to me in that it matches
> > the CONFIG_GBM guards around other similar functions and the resulting
> > binary appears to work, so:
> >
> > Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>
> Thank you, I'll post a formal patch then.
>
> I wonder why this got merged while this configuration is covered in
> Travis-CI. Is it that we have a too high failure rate than we don't
> use it anymore?
I've not looked at travis in ages what matters is GitLab CI, and there
the problem is that we're building ubuntu 20.04 not 18.04 so didn't
catch the older problem.
I don't know what Mark sees a problem on Debian Buster though, as we
successfully built there AFAICT
https://gitlab.com/qemu-project/qemu/-/jobs/1756202449
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PULL 0/6] Egl 20211105 patches
2021-11-08 9:22 ` Daniel P. Berrangé
@ 2021-11-08 9:36 ` Gerd Hoffmann
2021-11-08 9:37 ` Philippe Mathieu-Daudé
2021-11-08 9:41 ` Mark Cave-Ayland
2 siblings, 0 replies; 19+ messages in thread
From: Gerd Hoffmann @ 2021-11-08 9:36 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: Thomas Huth, Dongwon Kim, Michael S. Tsirkin, Mark Cave-Ayland,
Richard Henderson, qemu-devel, Philippe Mathieu-Daudé,
Laurent Vivier
> > >> +#ifdef CONFIG_GBM
> > >> if (vc->gfx.guest_fb.dmabuf) {
> > >> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
> > >> gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
> > >> }
> > >> +#endif
> I don't know what Mark sees a problem on Debian Buster though, as we
> successfully built there AFAICT
>
> https://gitlab.com/qemu-project/qemu/-/jobs/1756202449
Probably depends on whenever libgbm-dev (or whatever the package
is named on debian) is installed or not.
take care,
Gerd
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PULL 0/6] Egl 20211105 patches
2021-11-08 9:22 ` Daniel P. Berrangé
2021-11-08 9:36 ` Gerd Hoffmann
@ 2021-11-08 9:37 ` Philippe Mathieu-Daudé
2021-11-08 9:41 ` Mark Cave-Ayland
2 siblings, 0 replies; 19+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-08 9:37 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: Thomas Huth, Dongwon Kim, Michael S. Tsirkin, Mark Cave-Ayland,
Richard Henderson, qemu-devel, Laurent Vivier, Gerd Hoffmann
On 11/8/21 10:22, Daniel P. Berrangé wrote:
> On Mon, Nov 08, 2021 at 09:17:19AM +0100, Philippe Mathieu-Daudé wrote:
>> +Thomas & Daniel for Travis-CI
>>
>> On 11/8/21 09:12, Mark Cave-Ayland wrote:
>>> On 05/11/2021 18:49, Philippe Mathieu-Daudé wrote:
>>>> On 11/5/21 19:26, Philippe Mathieu-Daudé wrote:
>>>>> On 11/5/21 18:13, Richard Henderson wrote:
>>>>>> On 11/5/21 7:30 AM, Gerd Hoffmann wrote:
>>>>>>> The following changes since commit
>>>>>>> b1fd92137e4d485adeec8e9f292f928ff335b76c:
>>>>>>>
>>>>>>> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream'
>>>>>>> into staging (2021-11-03 13:07:30 -0400)
>>>>>>>
>>>>>>> are available in the Git repository at:
>>>>>>>
>>>>>>> git://git.kraxel.org/qemu tags/egl-20211105-pull-request
>>>>>>>
>>>>>>> for you to fetch changes up to
>>>>>>> 1350ff156b25be65c599ecca9957ce6726c6d383:
>>>>>>>
>>>>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout
>>>>>>> surface
>>>>>>> (2021-11-05 12:29:44 +0100)
>>>>>>>
>>>>>>> ----------------------------------------------------------------
>>>>>>> gtk: a collection of egl fixes.
>>>>>>>
>>>>>>> ----------------------------------------------------------------
>>>>>>>
>>>>>>> Dongwon Kim (6):
>>>>>>> virtio-gpu: splitting one extended mode guest fb into n-scanouts
>>>>>>> ui/gtk-egl: un-tab and re-tab should destroy egl surface and
>>>>>>> context
>>>>>>> ui/gtk-egl: make sure the right context is set as the current
>>>>>>> ui/gtk-egl: guest fb texture needs to be regenerated when
>>>>>>> reinitializing egl
>>>>>>> ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
>>>>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout
>>>>>>> surface
>>>>>>>
>>>>>>> include/hw/virtio/virtio-gpu.h | 5 +++--
>>>>>>> include/ui/console.h | 4 ++++
>>>>>>> hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++-
>>>>>>> hw/display/virtio-gpu-udmabuf.c | 22 ++++++++++++++--------
>>>>>>> hw/display/virtio-gpu.c | 4 ++--
>>>>>>> ui/egl-helpers.c | 25
>>>>>>> +++++++++++++++++++++----
>>>>>>> ui/gtk-egl.c | 10 ++++++++++
>>>>>>> ui/gtk.c | 23 +++++++++++++++++++++++
>>>>>>> 8 files changed, 79 insertions(+), 17 deletions(-)
>>>>>>
>>>>>> Applied, thanks.
>>>>>
>>>>> Ubuntu 18.04.4 LTS:
>>>>>
>>>>> ui/gtk-egl.c:159:13: error: implicit declaration of function
>>>>> 'egl_dmabuf_release_texture' is invalid in C99
>>>>> [-Werror,-Wimplicit-function-declaration]
>>>>> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
>>>>> ^
>>>>> ui/gtk-egl.c:159:13: error: this function declaration is not a prototype
>>>>> [-Werror,-Wstrict-prototypes]
>>>>> 2 errors generated.
>>>>>
>>>>> https://app.travis-ci.com/gitlab/qemu-project/qemu/builds/241272737
>>>>>
>>>>
>>>> This seems to fix but I have no clue whether it is correct:
>>>>
>>>> -- >8 --
>>>> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
>>>> index f2026e4b5c9..45cb67712df 100644
>>>> --- a/ui/gtk-egl.c
>>>> +++ b/ui/gtk-egl.c
>>>> @@ -156,8 +156,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
>>>> surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
>>>> }
>>>> +#ifdef CONFIG_GBM
>>>> if (vc->gfx.guest_fb.dmabuf) {
>>>> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
>>>> gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
>>>> }
>>>> +#endif
>>>> }
>>>>
>>>> ---
>>>
>>> I see the same error here trying to build QEMU git master on Debian
>>> Buster (oldstable). The fix looks reasonable to me in that it matches
>>> the CONFIG_GBM guards around other similar functions and the resulting
>>> binary appears to work, so:
>>>
>>> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>
>> Thank you, I'll post a formal patch then.
>>
>> I wonder why this got merged while this configuration is covered in
>> Travis-CI. Is it that we have a too high failure rate than we don't
>> use it anymore?
>
> I've not looked at travis in ages what matters is GitLab CI, and there
I Cc'ed you because I thought it was you who suggested to add the
Travis-CI - GitLab bridge (external job). Maybe it was Thomas.
> the problem is that we're building ubuntu 20.04 not 18.04 so didn't
> catch the older problem.
>
> I don't know what Mark sees a problem on Debian Buster though, as we
> successfully built there AFAICT
>
> https://gitlab.com/qemu-project/qemu/-/jobs/1756202449
But here libgbm is installed:
Run-time dependency gbm found: YES 18.3.6
The issue is on hosts without it.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PULL 0/6] Egl 20211105 patches
2021-11-08 9:22 ` Daniel P. Berrangé
2021-11-08 9:36 ` Gerd Hoffmann
2021-11-08 9:37 ` Philippe Mathieu-Daudé
@ 2021-11-08 9:41 ` Mark Cave-Ayland
2021-11-08 9:47 ` Philippe Mathieu-Daudé
2 siblings, 1 reply; 19+ messages in thread
From: Mark Cave-Ayland @ 2021-11-08 9:41 UTC (permalink / raw)
To: Daniel P. Berrangé, Philippe Mathieu-Daudé
Cc: Thomas Huth, Dongwon Kim, Michael S. Tsirkin, Richard Henderson,
qemu-devel, Laurent Vivier, Gerd Hoffmann
On 08/11/2021 09:22, Daniel P. Berrangé wrote:
> On Mon, Nov 08, 2021 at 09:17:19AM +0100, Philippe Mathieu-Daudé wrote:
>> +Thomas & Daniel for Travis-CI
>>
>> On 11/8/21 09:12, Mark Cave-Ayland wrote:
>>> On 05/11/2021 18:49, Philippe Mathieu-Daudé wrote:
>>>> On 11/5/21 19:26, Philippe Mathieu-Daudé wrote:
>>>>> On 11/5/21 18:13, Richard Henderson wrote:
>>>>>> On 11/5/21 7:30 AM, Gerd Hoffmann wrote:
>>>>>>> The following changes since commit
>>>>>>> b1fd92137e4d485adeec8e9f292f928ff335b76c:
>>>>>>>
>>>>>>> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream'
>>>>>>> into staging (2021-11-03 13:07:30 -0400)
>>>>>>>
>>>>>>> are available in the Git repository at:
>>>>>>>
>>>>>>> git://git.kraxel.org/qemu tags/egl-20211105-pull-request
>>>>>>>
>>>>>>> for you to fetch changes up to
>>>>>>> 1350ff156b25be65c599ecca9957ce6726c6d383:
>>>>>>>
>>>>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout
>>>>>>> surface
>>>>>>> (2021-11-05 12:29:44 +0100)
>>>>>>>
>>>>>>> ----------------------------------------------------------------
>>>>>>> gtk: a collection of egl fixes.
>>>>>>>
>>>>>>> ----------------------------------------------------------------
>>>>>>>
>>>>>>> Dongwon Kim (6):
>>>>>>> virtio-gpu: splitting one extended mode guest fb into n-scanouts
>>>>>>> ui/gtk-egl: un-tab and re-tab should destroy egl surface and
>>>>>>> context
>>>>>>> ui/gtk-egl: make sure the right context is set as the current
>>>>>>> ui/gtk-egl: guest fb texture needs to be regenerated when
>>>>>>> reinitializing egl
>>>>>>> ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound
>>>>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout
>>>>>>> surface
>>>>>>>
>>>>>>> include/hw/virtio/virtio-gpu.h | 5 +++--
>>>>>>> include/ui/console.h | 4 ++++
>>>>>>> hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++-
>>>>>>> hw/display/virtio-gpu-udmabuf.c | 22 ++++++++++++++--------
>>>>>>> hw/display/virtio-gpu.c | 4 ++--
>>>>>>> ui/egl-helpers.c | 25
>>>>>>> +++++++++++++++++++++----
>>>>>>> ui/gtk-egl.c | 10 ++++++++++
>>>>>>> ui/gtk.c | 23 +++++++++++++++++++++++
>>>>>>> 8 files changed, 79 insertions(+), 17 deletions(-)
>>>>>>
>>>>>> Applied, thanks.
>>>>>
>>>>> Ubuntu 18.04.4 LTS:
>>>>>
>>>>> ui/gtk-egl.c:159:13: error: implicit declaration of function
>>>>> 'egl_dmabuf_release_texture' is invalid in C99
>>>>> [-Werror,-Wimplicit-function-declaration]
>>>>> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
>>>>> ^
>>>>> ui/gtk-egl.c:159:13: error: this function declaration is not a prototype
>>>>> [-Werror,-Wstrict-prototypes]
>>>>> 2 errors generated.
>>>>>
>>>>> https://app.travis-ci.com/gitlab/qemu-project/qemu/builds/241272737
>>>>>
>>>>
>>>> This seems to fix but I have no clue whether it is correct:
>>>>
>>>> -- >8 --
>>>> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
>>>> index f2026e4b5c9..45cb67712df 100644
>>>> --- a/ui/gtk-egl.c
>>>> +++ b/ui/gtk-egl.c
>>>> @@ -156,8 +156,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
>>>> surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
>>>> }
>>>> +#ifdef CONFIG_GBM
>>>> if (vc->gfx.guest_fb.dmabuf) {
>>>> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
>>>> gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
>>>> }
>>>> +#endif
>>>> }
>>>>
>>>> ---
>>>
>>> I see the same error here trying to build QEMU git master on Debian
>>> Buster (oldstable). The fix looks reasonable to me in that it matches
>>> the CONFIG_GBM guards around other similar functions and the resulting
>>> binary appears to work, so:
>>>
>>> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>
>> Thank you, I'll post a formal patch then.
>>
>> I wonder why this got merged while this configuration is covered in
>> Travis-CI. Is it that we have a too high failure rate than we don't
>> use it anymore?
>
> I've not looked at travis in ages what matters is GitLab CI, and there
> the problem is that we're building ubuntu 20.04 not 18.04 so didn't
> catch the older problem.
>
> I don't know what Mark sees a problem on Debian Buster though, as we
> successfully built there AFAICT
>
> https://gitlab.com/qemu-project/qemu/-/jobs/1756202449
That's interesting. Below is the configure output from my laptop which was generated
with "./configure --target-list=m68k-softmmu --prefix=/home/build/rel-qemu-git":
The Meson build system
Version: 0.59.3
Source dir: /home/build/src/qemu/git/qemu
Build dir: /home/build/src/qemu/git/qemu/build
Build type: native build
Project name: qemu
Project version: 6.1.50
C compiler for the host machine: cc -m64 -mcx16 (gcc 8.3.0 "cc (Debian 8.3.0-6) 8.3.0")
C linker for the host machine: cc -m64 -mcx16 ld.bfd 2.31.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program sh found: YES (/bin/sh)
Program python3 found: YES (/usr/bin/python3)
WARNING: Broken python installation detected. Python files installed by Meson might
not be found by python interpreter.
C++ compiler for the host machine: c++ -m64 -mcx16 (gcc 8.3.0 "c++ (Debian 8.3.0-6)
8.3.0")
C++ linker for the host machine: c++ -m64 -mcx16 ld.bfd 2.31.1
Program cgcc found: NO
Library m found: YES
Run-time dependency threads found: YES
Library util found: YES
Run-time dependency appleframeworks found: NO (tried framework)
Found pkg-config: /usr/bin/pkg-config (0.29)
Run-time dependency pixman-1 found: YES 0.36.0
Run-time dependency zlib found: YES 1.2.11
Has header "libaio.h" : YES
Library aio found: YES
Run-time dependency liburing found: NO (tried pkgconfig)
Run-time dependency libxml-2.0 found: NO (tried pkgconfig)
Run-time dependency libnfs found: YES 3.0.0
Run-time dependency appleframeworks found: NO (tried framework)
Run-time dependency libseccomp found: YES 2.3.3
Has header "cap-ng.h" : YES
Library cap-ng found: YES
Run-time dependency xkbcommon found: YES 0.8.2
Has header "libvdeplug.h" : YES
Library vdeplug found: YES
Run-time dependency libpulse found: YES 12.2
Run-time dependency alsa found: YES 1.1.8
Run-time dependency jack found: NO (tried pkgconfig)
Run-time dependency spice-protocol found: YES 0.12.14
Run-time dependency spice-server found: YES 0.14.0
Library rt found: YES
Library dl found: YES
Checking for function "dlopen" with dependency -ldl: YES
Run-time dependency libiscsi found: YES 1.18.0
Run-time dependency libzstd found: NO (tried pkgconfig)
Run-time dependency virglrenderer found: NO (tried pkgconfig)
Run-time dependency libcurl found: YES 7.64.0
Run-time dependency libudev found: YES 241
Library mpathpersist found: NO
Run-time dependency ncursesw found: YES 6.1.20181013
Has header "brlapi.h" : YES
Library brlapi found: YES
Run-time dependency sdl2 found: YES 2.0.9
Run-time dependency sdl2_image found: NO (tried pkgconfig)
Library rados found: YES
Has header "rbd/librbd.h" : YES
Library rbd found: YES
Run-time dependency glusterfs-api found: YES 7.5.5
Has header "bzlib.h" : NO
Has header "lzfse.h" : NO
Has header "sys/soundcard.h" : YES
Run-time dependency gbm found: NO (tried pkgconfig)
Dependency gnutls found: NO found 3.6.7 but need: '>=3.6.14'
Run-time dependency gnutls found: NO (tried pkgconfig)
Run-time dependency gnutls found: YES 3.6.7
libgcrypt-config found: YES (/usr/bin/libgcrypt-config) 1.8.4
Run-time dependency libgcrypt found: YES 1.8.4
Run-time dependency gtk+-3.0 found: YES 3.24.5
Run-time dependency gtk+-x11-3.0 found: YES 3.24.5
Run-time dependency vte-2.91 found: YES 0.54.2
Run-time dependency x11 found: YES 1.6.7
Run-time dependency libpng found: YES 1.6.36
Run-time dependency libjpeg found: YES 1.5.2
Has header "sasl/sasl.h" : YES
Library sasl2 found: YES
Has header "security/pam_appl.h" : NO
Has header "snappy-c.h" : NO
Has header "lzo/lzo1x.h" : NO
Run-time dependency libcacard found: YES 2.6.1
Run-time dependency u2f-emu found: NO (tried pkgconfig)
Run-time dependency libusbredirparser-0.5 found: YES 0.8.0
Run-time dependency libusb-1.0 found: YES 1.0.22
Run-time dependency libpmem found: NO (tried pkgconfig)
Run-time dependency libdaxctl found: NO (tried pkgconfig)
Run-time dependency libtasn1 found: YES 4.13
Run-time dependency libkeyutils found: NO (tried pkgconfig)
Checking for function "gettid" : NO
Run-time dependency fuse3 found: NO (tried pkgconfig)
Run-time dependency libbpf found: NO (tried pkgconfig)
Has header "sys/epoll.h" : YES
Has header "linux/magic.h" : YES
Has header "valgrind/valgrind.h" : YES
Has header "linux/btrfs.h" : YES
Has header "libdrm/drm.h" : YES
Has header "pty.h" : YES
Has header "sys/disk.h" : NO
Has header "sys/ioccom.h" : NO
Has header "sys/kcov.h" : NO
Checking for function "accept4" : YES
Checking for function "clock_adjtime" : YES
Checking for function "dup3" : YES
Checking for function "fallocate" : YES
Checking for function "posix_fallocate" : YES
Checking for function "posix_memalign" : YES
Checking for function "ppoll" : YES
Checking for function "preadv" : YES
Checking for function "sem_timedwait" with dependency threads: YES
Checking for function "sendfile" : YES
Checking for function "setns" : YES
Checking for function "unshare" : YES
Checking for function "syncfs" : YES
Checking for function "sync_file_range" : YES
Checking for function "timerfd_create" : YES
Checking for function "copy_file_range" : YES
Checking for function "openpty" with dependency -lutil: YES
Checking for function "strchrnul" : YES
Checking for function "system" : YES
Header <byteswap.h> has symbol "bswap_32" : YES
Header <sys/epoll.h> has symbol "epoll_create1" : YES
Header <unistd.h> has symbol "environ" : YES
Header <linux/falloc.h> has symbol "FALLOC_FL_PUNCH_HOLE" : YES
Header <linux/falloc.h> has symbol "FALLOC_FL_KEEP_SIZE" : YES
Header <linux/falloc.h> has symbol "FALLOC_FL_ZERO_RANGE" : YES
Has header "linux/fiemap.h" : YES
Header <linux/fs.h> has symbol "FS_IOC_FIEMAP" : YES
Checking for function "getrandom" : YES
Header <sys/random.h> has symbol "GRND_NONBLOCK" : YES
Header <sys/inotify.h> has symbol "inotify_init" : YES
Header <sys/inotify.h> has symbol "inotify_init1" : YES
Header <sys/uio.h> has symbol "struct iovec" : YES
Header <machine/bswap.h> has symbol "bswap32" : NO
Header <sys/prctl.h> has symbol "PR_SET_TIMERSLACK" : YES
Header <linux/rtnetlink.h> has symbol "IFLA_PROTO_DOWN" : YES
Header <sys/sysmacros.h> has symbol "makedev" : YES
Header <getopt.h> has symbol "optreset" : NO
Header <utmpx.h> has symbol "struct utmpx" : YES
Header <netinet/in.h> has symbol "IPPROTO_MPTCP" : NO
Checking whether type "struct sigevent" has member "sigev_notify_thread_id" : NO
Checking whether type "struct stat" has member "st_atim" : YES
Header <sys/socket.h> has symbol "struct mmsghdr" : YES
Has header "linux/ip.h" : YES
Program scripts/minikconf.py found: YES (/usr/bin/python3
/home/build/src/qemu/git/qemu/scripts/minikconf.py)
Configuring m68k-softmmu-config-target.h using configuration
Configuring m68k-softmmu-config-devices.mak with command
Reading depfile:
/home/build/src/qemu/git/qemu/build/meson-private/m68k-softmmu-config-devices.mak.d
Configuring m68k-softmmu-config-devices.h using configuration
Run-time dependency capstone found: NO (tried pkgconfig)
Configuring capstone-defs.h using configuration
Run-time dependency slirp found: NO (tried pkgconfig)
Configuring libslirp-version.h using configuration
Library fdt found: YES
Configuring config-host.h using configuration
Program scripts/hxtool found: YES (/home/build/src/qemu/git/qemu/scripts/hxtool)
Program scripts/shaderinclude.pl found: YES (/usr/bin/env perl
/home/build/src/qemu/git/qemu/scripts/shaderinclude.pl)
Program scripts/qapi-gen.py found: YES (/usr/bin/python3
/home/build/src/qemu/git/qemu/scripts/qapi-gen.py)
Program scripts/qemu-version.sh found: YES
(/home/build/src/qemu/git/qemu/scripts/qemu-version.sh)
Executing subproject libvhost-user
libvhost-user| Project name: libvhost-user
libvhost-user| Project version: undefined
libvhost-user| C compiler for the host machine: cc -m64 -mcx16 (gcc 8.3.0 "cc (Debian
8.3.0-6) 8.3.0")
libvhost-user| C linker for the host machine: cc -m64 -mcx16 ld.bfd 2.31.1
libvhost-user| Dependency threads found: YES unknown (cached)
libvhost-user| Dependency glib-2.0 found: YES 6.1.50 (overridden)
libvhost-user| Build targets in project: 11
libvhost-user| Subproject libvhost-user finished.
Program cat found: YES (/bin/cat)
Program scripts/decodetree.py found: YES (/usr/bin/python3
/home/build/src/qemu/git/qemu/scripts/decodetree.py)
Program ../scripts/modules/module_block.py found: YES (/usr/bin/python3
/home/build/src/qemu/git/qemu/block/../scripts/modules/module_block.py)
Program ../scripts/block-coroutine-wrapper.py found: YES (/usr/bin/python3
/home/build/src/qemu/git/qemu/block/../scripts/block-coroutine-wrapper.py)
Program scripts/modinfo-collect.py found: YES
(/home/build/src/qemu/git/qemu/scripts/modinfo-collect.py)
Program scripts/modinfo-generate.py found: YES
(/home/build/src/qemu/git/qemu/scripts/modinfo-generate.py)
Program nm found: YES
Program scripts/undefsym.py found: YES (/usr/bin/python3
/home/build/src/qemu/git/qemu/scripts/undefsym.py)
Program scripts/feature_to_c.sh found: YES (/bin/sh
/home/build/src/qemu/git/qemu/scripts/feature_to_c.sh)
Configuring 50-qemu-virtiofsd.json using configuration
Program qemu-keymap found: NO
Program cp found: YES (/bin/cp)
Program sphinx-build-3 sphinx-build found: NO
Program python3 found: YES (/usr/bin/python3)
Program diff found: YES (/usr/bin/diff)
Program dbus-daemon found: YES (/usr/bin/dbus-daemon)
Program /usr/bin/gdbus-codegen found: YES (/usr/bin/gdbus-codegen)
Program initrd-stress.sh found: YES
(/home/build/src/qemu/git/qemu/tests/migration/initrd-stress.sh)
Program xgettext found: YES (/usr/bin/xgettext)
Build targets in project: 423
qemu 6.1.50
Directories
Install prefix : /home/build/rel-qemu-git
BIOS directory : share/qemu
firmware path : /home/build/rel-qemu-git/share/qemu-firmware
binary directory : bin
library directory : lib
module directory : lib/qemu
libexec directory : libexec
include directory : include
config directory : /home/build/rel-qemu-git/etc
local state directory : /home/build/rel-qemu-git/var
Manual directory : share/man
Doc directory : /home/build/rel-qemu-git/share/doc
Build directory : /home/build/src/qemu/git/qemu/build
Source path : /home/build/src/qemu/git/qemu
GIT submodules : ui/keycodemapdb meson
tests/fp/berkeley-testfloat-3 tests/fp/berkeley-softfloat-3 dtc capstone slirp
Host binaries
git : git
make : make
python : /usr/bin/python3 (version: 3.7)
sphinx-build : NO
genisoimage : /usr/bin/genisoimage
smbd : "/usr/sbin/smbd"
Configurable features
Documentation : NO
system-mode emulation : YES
user-mode emulation : NO
block layer : YES
Install blobs : YES
module support : NO
fuzzing support : NO
Audio drivers : pa oss
Trace backends : log
QOM debugging : YES
vhost-kernel support : YES
vhost-net support : YES
vhost-crypto support : YES
vhost-scsi support : YES
vhost-vsock support : YES
vhost-user support : YES
vhost-user-blk server support: YES
vhost-user-fs support : YES
vhost-vdpa support : YES
build guest agent : YES
Compilation
host CPU : x86_64
host endianness : little
C compiler : cc -m64 -mcx16
Host C compiler : cc -m64 -mcx16
C++ compiler : c++ -m64 -mcx16
CFLAGS : -O2 -g
CXXFLAGS : -O2 -g
QEMU_CFLAGS : -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
-Wredundant-decls -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing
-fno-common -fwrapv -Wold-style-declaration -Wold-style-definition -Wtype-limits
-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body
-Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wimplicit-fallthrough=2
-Wno-missing-include-dirs -Wno-shift-negative-value -Wno-psabi -fstack-protector-strong
QEMU_LDFLAGS : -Wl,--warn-common -Wl,-z,relro -Wl,-z,now
-fstack-protector-strong
profiler : NO
link-time optimization (LTO) : NO
PIE : YES
static build : NO
malloc trim support : YES
membarrier : NO
debug stack usage : NO
mutex debugging : NO
memory allocator : system
avx2 optimization : YES
avx512f optimization : NO
gprof enabled : NO
gcov : NO
thread sanitizer : NO
CFI support : NO
strip binaries : YES
sparse : NO
mingw32 support : NO
m68k tests : m68k-linux-gnu-gcc via debian-m68k-cross
Targets and accelerators
KVM support : NO
HAX support : NO
HVF support : NO
WHPX support : NO
NVMM support : NO
Xen support : YES
xen ctrl version : 41100
TCG support : YES
TCG backend : native (x86_64)
TCG plugins : YES
TCG debug enabled : NO
target list : m68k-softmmu
default devices : YES
out of process emulation : YES
Block layer support
coroutine backend : ucontext
coroutine pool : YES
Block whitelist (rw) :
Block whitelist (ro) :
Use block whitelist in tools : NO
VirtFS support : YES
build virtiofs daemon : YES
Live block migration : YES
replication support : YES
bochs support : YES
cloop support : YES
dmg support : YES
qcow v1 support : YES
vdi support : YES
vvfat support : YES
qed support : YES
parallels support : YES
FUSE exports : NO
Crypto
TLS priority : "NORMAL"
GNUTLS support : YES 3.6.7
GNUTLS crypto : NO
libgcrypt : YES 1.8.4
nettle : NO
crypto afalg : NO
rng-none : NO
Linux keyring : YES
Dependencies
SDL support : YES
SDL image support : NO
GTK support : YES
pixman : YES 0.36.0
VTE support : YES 0.54.2
slirp support : internal
libtasn1 : YES 4.13
PAM : NO
iconv support : YES
curses support : YES
virgl support : NO
curl support : YES 7.64.0
Multipath support : NO
VNC support : YES
VNC SASL support : YES
VNC JPEG support : YES 1.5.2
VNC PNG support : YES 1.6.36
OSS support : YES
ALSA support : YES 1.1.8
PulseAudio support : YES 12.2
JACK support : NO
brlapi support : YES
vde support : YES
netmap support : NO
l2tpv3 support : YES
Linux AIO support : YES
Linux io_uring support : NO
ATTR/XATTR support : YES
RDMA support : NO
PVRDMA support : NO
fdt support : internal
libcap-ng support : YES
bpf support : NO
spice protocol support : YES 0.12.14
spice server support : YES 0.14.0
rbd support : YES
xfsctl support : YES
smartcard support : YES 2.6.1
U2F support : NO
libusb : YES 1.0.22
usb net redir : YES 0.8.0
OpenGL support : YES
GBM : NO
libiscsi support : YES 1.18.0
libnfs support : YES 3.0.0
seccomp support : YES 2.3.3
GlusterFS support : YES 7.5.5
TPM support : YES
libssh support : NO
lzo support : NO
snappy support : NO
bzip2 support : NO
lzfse support : NO
zstd support : NO
NUMA host support : YES
libxml2 : NO
capstone : internal
libpmem support : NO
libdaxctl support : NO
libudev : YES 241
FUSE lseek : NO
Subprojects
libvhost-user : YES
Found ninja-1.8.2 at /usr/bin/ninja
I tend to use GTK most of the time, so maybe related to SDL/virgl?
ATB,
Mark.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PULL 0/6] Egl 20211105 patches
2021-11-08 9:41 ` Mark Cave-Ayland
@ 2021-11-08 9:47 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 19+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-08 9:47 UTC (permalink / raw)
To: Mark Cave-Ayland, Daniel P. Berrangé
Cc: Thomas Huth, Dongwon Kim, Michael S. Tsirkin, Richard Henderson,
qemu-devel, Laurent Vivier, Gerd Hoffmann
On 11/8/21 10:41, Mark Cave-Ayland wrote:
> On 08/11/2021 09:22, Daniel P. Berrangé wrote:
>
>> On Mon, Nov 08, 2021 at 09:17:19AM +0100, Philippe Mathieu-Daudé wrote:
>>> +Thomas & Daniel for Travis-CI
>>>
>>> On 11/8/21 09:12, Mark Cave-Ayland wrote:
>>>> On 05/11/2021 18:49, Philippe Mathieu-Daudé wrote:
>>>>> On 11/5/21 19:26, Philippe Mathieu-Daudé wrote:
>>>>>> On 11/5/21 18:13, Richard Henderson wrote:
>>>>>>> On 11/5/21 7:30 AM, Gerd Hoffmann wrote:
>>>>>>>> The following changes since commit
>>>>>>>> b1fd92137e4d485adeec8e9f292f928ff335b76c:
>>>>>>>>
>>>>>>>> Merge remote-tracking branch
>>>>>>>> 'remotes/bonzini/tags/for-upstream'
>>>>>>>> into staging (2021-11-03 13:07:30 -0400)
>>>>>>>>
>>>>>>>> are available in the Git repository at:
>>>>>>>>
>>>>>>>> git://git.kraxel.org/qemu tags/egl-20211105-pull-request
>>>>>>>>
>>>>>>>> for you to fetch changes up to
>>>>>>>> 1350ff156b25be65c599ecca9957ce6726c6d383:
>>>>>>>>
>>>>>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout
>>>>>>>> surface
>>>>>>>> (2021-11-05 12:29:44 +0100)
>>>>>>>>
>>>>>>>> ----------------------------------------------------------------
>>>>>>>> gtk: a collection of egl fixes.
>>>>>>>>
>>>>>>>> ----------------------------------------------------------------
>>>>>>>>
>>>>>>>> Dongwon Kim (6):
>>>>>>>> virtio-gpu: splitting one extended mode guest fb into
>>>>>>>> n-scanouts
>>>>>>>> ui/gtk-egl: un-tab and re-tab should destroy egl surface and
>>>>>>>> context
>>>>>>>> ui/gtk-egl: make sure the right context is set as the current
>>>>>>>> ui/gtk-egl: guest fb texture needs to be regenerated when
>>>>>>>> reinitializing egl
>>>>>>>> ui/gtk: gd_draw_event returns FALSE when no cairo surface
>>>>>>>> is bound
>>>>>>>> ui/gtk-egl: blitting partial guest fb to the proper scanout
>>>>>>>> surface
>>>>>>>>
>>>>>>>> include/hw/virtio/virtio-gpu.h | 5 +++--
>>>>>>>> include/ui/console.h | 4 ++++
>>>>>>>> hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++-
>>>>>>>> hw/display/virtio-gpu-udmabuf.c | 22
>>>>>>>> ++++++++++++++--------
>>>>>>>> hw/display/virtio-gpu.c | 4 ++--
>>>>>>>> ui/egl-helpers.c | 25
>>>>>>>> +++++++++++++++++++++----
>>>>>>>> ui/gtk-egl.c | 10 ++++++++++
>>>>>>>> ui/gtk.c | 23
>>>>>>>> +++++++++++++++++++++++
>>>>>>>> 8 files changed, 79 insertions(+), 17 deletions(-)
>>>>>>>
>>>>>>> Applied, thanks.
>>>>>>
>>>>>> Ubuntu 18.04.4 LTS:
>>>>>>
>>>>>> ui/gtk-egl.c:159:13: error: implicit declaration of function
>>>>>> 'egl_dmabuf_release_texture' is invalid in C99
>>>>>> [-Werror,-Wimplicit-function-declaration]
>>>>>> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
>>>>>> ^
>>>>>> ui/gtk-egl.c:159:13: error: this function declaration is not a
>>>>>> prototype
>>>>>> [-Werror,-Wstrict-prototypes]
>>>>>> 2 errors generated.
>>>>>>
>>>>>> https://app.travis-ci.com/gitlab/qemu-project/qemu/builds/241272737
>>>>>>
>>>>>
>>>>> This seems to fix but I have no clue whether it is correct:
>>>>>
>>>>> -- >8 --
>>>>> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
>>>>> index f2026e4b5c9..45cb67712df 100644
>>>>> --- a/ui/gtk-egl.c
>>>>> +++ b/ui/gtk-egl.c
>>>>> @@ -156,8 +156,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
>>>>> surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds);
>>>>> }
>>>>> +#ifdef CONFIG_GBM
>>>>> if (vc->gfx.guest_fb.dmabuf) {
>>>>> egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf);
>>>>> gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf);
>>>>> }
>>>>> +#endif
>>>>> }
>>>>>
>>>>> ---
>>>>
>>>> I see the same error here trying to build QEMU git master on Debian
>>>> Buster (oldstable). The fix looks reasonable to me in that it matches
>>>> the CONFIG_GBM guards around other similar functions and the resulting
>>>> binary appears to work, so:
>>>>
>>>> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>>
>>> Thank you, I'll post a formal patch then.
>>>
>>> I wonder why this got merged while this configuration is covered in
>>> Travis-CI. Is it that we have a too high failure rate than we don't
>>> use it anymore?
>>
>> I've not looked at travis in ages what matters is GitLab CI, and there
>> the problem is that we're building ubuntu 20.04 not 18.04 so didn't
>> catch the older problem.
>>
>> I don't know what Mark sees a problem on Debian Buster though, as we
>> successfully built there AFAICT
>>
>> https://gitlab.com/qemu-project/qemu/-/jobs/1756202449
>
> That's interesting. Below is the configure output from my laptop which
> was generated with "./configure --target-list=m68k-softmmu
> --prefix=/home/build/rel-qemu-git":
...
> Run-time dependency gbm found: NO (tried pkgconfig)
> Dependencies
> SDL support : YES
> SDL image support : NO
> GTK support : YES
> pixman : YES 0.36.0
> iconv support : YES
> curses support : YES
> virgl support : NO
> OpenGL support : YES
> GBM : NO
>
> I tend to use GTK most of the time, so maybe related to SDL/virgl?
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2021-11-08 9:49 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 11:30 [PULL 0/6] Egl 20211105 patches Gerd Hoffmann
2021-11-05 11:30 ` [PULL 1/6] virtio-gpu: splitting one extended mode guest fb into n-scanouts Gerd Hoffmann
2021-11-05 11:30 ` [PULL 2/6] ui/gtk-egl: un-tab and re-tab should destroy egl surface and context Gerd Hoffmann
2021-11-05 11:30 ` [PULL 3/6] ui/gtk-egl: make sure the right context is set as the current Gerd Hoffmann
2021-11-05 11:30 ` [PULL 4/6] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl Gerd Hoffmann
2021-11-06 20:32 ` Laurent Vivier
2021-11-08 8:07 ` Philippe Mathieu-Daudé
2021-11-05 11:30 ` [PULL 5/6] ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound Gerd Hoffmann
2021-11-05 11:30 ` [PULL 6/6] ui/gtk-egl: blitting partial guest fb to the proper scanout surface Gerd Hoffmann
2021-11-05 17:13 ` [PULL 0/6] Egl 20211105 patches Richard Henderson
2021-11-05 18:26 ` Philippe Mathieu-Daudé
2021-11-05 18:49 ` Philippe Mathieu-Daudé
2021-11-08 8:12 ` Mark Cave-Ayland
2021-11-08 8:17 ` Philippe Mathieu-Daudé
2021-11-08 9:22 ` Daniel P. Berrangé
2021-11-08 9:36 ` Gerd Hoffmann
2021-11-08 9:37 ` Philippe Mathieu-Daudé
2021-11-08 9:41 ` Mark Cave-Ayland
2021-11-08 9:47 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).