blob: 446105ed1d11f5dcba21a2ff9ed72fd919e1da62 [file] [log] [blame]
diff --git a/configure.ac b/configure.ac
index 50f8e013..257c7fa7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -215,9 +215,6 @@ if test x$enable_drm_compositor = xyes; then
PKG_CHECK_MODULES(DRM_COMPOSITOR_FORMATS_BLOB, [libdrm >= 2.4.83],
[AC_DEFINE([HAVE_DRM_FORMATS_BLOB], 1, [libdrm supports modifier advertisement])],
[AC_MSG_WARN([libdrm does not support modifier advertisement])])
- PKG_CHECK_MODULES(DRM_COMPOSITOR_GBM_MODIFIERS, [gbm >= 17.1],
- [AC_DEFINE([HAVE_GBM_MODIFIERS], 1, [GBM supports modifiers])],
- [AC_MSG_WARN([GBM does not support modifiers])])
PKG_CHECK_MODULES(DRM_COMPOSITOR_GBM, [gbm >= 17.2],
[AC_DEFINE([HAVE_GBM_FD_IMPORT], 1, [gbm supports import with modifiers])],
[AC_MSG_WARN([GBM does not support dmabuf import, will omit that capability])])
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 38911763..5a94c8df 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -1161,13 +1161,13 @@ drm_fb_get_from_dmabuf(struct linux_dmabuf_buffer *dmabuf,
weston_log("bo geometry out of bounds\n");
goto err_free;
}
-
+#if HAVE_GBM_MODIFIERS
for (i = 0; i < dmabuf->attributes.n_planes; i++) {
fb->handles[i] = gbm_bo_get_handle_for_plane(fb->bo, i).u32;
if (!fb->handles[i])
goto err_free;
}
-
+#endif
if (drm_fb_addfb(fb) != 0)
goto err_free;