[PATCH v16 15/23] compositor-drm: Support modifiers with GBM
Emil Velikov
emil.l.velikov at gmail.com
Fri Jul 6 10:02:20 UTC 2018
Hi Dan,
On 5 July 2018 at 18:16, Daniel Stone <daniels at collabora.com> wrote:
> Use the extended GBM allocator interface to support modifiers and
> multi-planar BOs.
>
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> Tested-by: Emre Ucan <eucan at de.adit-jv.com>
> ---
> configure.ac | 3 ++
> libweston/compositor-drm.c | 61 +++++++++++++++++++++++++++++++-------
> 2 files changed, 53 insertions(+), 11 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index c550198ae..357b6471e 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -215,6 +215,9 @@ 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])])
Instead of such lovely checks and multiple #ifdef blocks through in
the code, one can use weak symbols.
See kmscube code has some examples.
That said, it's something that could be handled at a later stage.
There's no point in delaying the series over that detail.
Thanks
Emil
More information about the wayland-devel
mailing list