From 6f59e4858e24c828e3ab0e611d36dfaaded1b272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Francis=20Ratt=C3=A9-Boulianne?= Date: Mon, 19 Feb 2018 13:36:22 -0500 Subject: [PATCH] renderer/native: Don't use modifiers to import linear DMA buffer When the buffer modifier is DRM_FORMAT_MOD_LINEAR, we can use the old code path. That means not specifying any modifier parameter. It was an issue when the primary GPU was creating a linear GBM surface and that a secondary GPU (not supporting modifiers) was trying to import it. It was failing because the driver could not use the import_modifiers extension even though it could in theory easily import the buffer. https://gitlab.gnome.org/GNOME/mutter/issues/18 --- src/backends/native/meta-renderer-native-gles3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backends/native/meta-renderer-native-gles3.c b/src/backends/native/meta-renderer-native-gles3.c index a606d0ddd..dbc59b6f6 100644 --- a/src/backends/native/meta-renderer-native-gles3.c +++ b/src/backends/native/meta-renderer-native-gles3.c @@ -77,7 +77,8 @@ create_egl_image (MetaEgl *egl, attribs[atti++] = EGL_LINUX_DRM_FOURCC_EXT; attribs[atti++] = format; - has_modifier = (modifiers[0] != DRM_FORMAT_MOD_INVALID); + has_modifier = (modifiers[0] != DRM_FORMAT_MOD_INVALID && + modifiers[0] != DRM_FORMAT_MOD_LINEAR); if (n_planes > 0) {