[PATCH weston v12 27/40] compositor-drm: Add modifiers to GBM dmabuf import

Pekka Paalanen ppaalanen at gmail.com
Thu Sep 28 11:03:33 UTC 2017


On Wed, 27 Sep 2017 11:45:34 +0200
Philipp Zabel <p.zabel at pengutronix.de> wrote:

> On Tue, 2017-09-26 at 18:16 +0100, Daniel Stone wrote:
> > Add support for the GBM_BO_IMPORT_FD_MODIFIER path, which allows us to
> > import multi-plane dmabufs, as well as format modifiers.
> > 
> > Signed-off-by: Daniel Stone <daniels at collabora.com>
> > ---
> >  configure.ac               |   3 -
> >  libweston/compositor-drm.c | 181 +++++++++++++++++++++++++++++++++---
> > ---------
> >  2 files changed, 133 insertions(+), 51 deletions(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index f09d0e04..3996c80c 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -203,9 +203,6 @@ if test x$enable_drm_compositor = xyes; then
> >    PKG_CHECK_MODULES(DRM_COMPOSITOR_ATOMIC, [libdrm >= 2.4.78],
> >  		    [AC_DEFINE([HAVE_DRM_ATOMIC], 1, [libdrm supports
> > atomic API])],
> >  		    [AC_MSG_WARN([libdrm does not support atomic
> > modesetting, will omit that capability])])
> > -  PKG_CHECK_MODULES(DRM_COMPOSITOR_GBM, [gbm >= 10.2],
> > -		    [AC_DEFINE([HAVE_GBM_FD_IMPORT], 1, [gbm supports
> > dmabuf import])],
> > -		    [AC_MSG_WARN([gbm does not support dmabuf import,
> > will omit that capability])])  
> 
> Should this check for a newer gbm instead? With the modifiers, this
> won't build against the gbm from  Mesa 17.1.10 anymore.

Yup, it certainly fails to build here:

  CC       libweston/drm_backend_la-compositor-drm.lo
/home/pq/git/weston/libweston/compositor-drm.c: In function ‘drm_fb_get_from_dmabuf’:
/home/pq/git/weston/libweston/compositor-drm.c:953:9: error: variable ‘import_mod’ has initializer but incomplete type
  struct gbm_import_fd_modifier_data import_mod = {

/home/pq/git/weston/libweston/compositor-drm.c:988:40: error: ‘GBM_BO_IMPORT_FD_MODIFIER’ undeclared (first use in this function)
   fb->bo = gbm_bo_import(backend->gbm, GBM_BO_IMPORT_FD_MODIFIER,

and a ton more.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170928/65d80d3f/attachment.sig>


More information about the wayland-devel mailing list