Rather than calling make_exportable from the get_bo entrypoint, make sure that someone has already explicitly requested the pixmap be exportable.
This is technically an ABI break in that it changes observable behaviour, but no driver other than modesetting has ever used get_bo. Signed-off-by: Daniel Stone <dani...@collabora.com> Reported-by: Adam Jackson <a...@redhat.com> --- glamor/glamor_egl.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index 0e771b6d2..dd6a9a2df 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -351,7 +351,7 @@ glamor_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap) struct glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); - if (!glamor_make_pixmap_exportable(pixmap)) + if (!pixmap_priv->image) return NULL; return gbm_bo_import(glamor_egl->gbm, GBM_BO_IMPORT_EGL_IMAGE, @@ -411,6 +411,9 @@ glamor_egl_fd_name_from_pixmap(ScreenPtr screen, glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen)); + if (!glamor_make_pixmap_exportable(pixmap)) + goto failure; + bo = glamor_gbm_bo_from_pixmap(screen, pixmap); if (!bo) goto failure; -- 2.17.0 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel