linux-dmabuf: Move the attributes part of linux_dmabuf_buffer into its own struct

This allows renderers to use that struct to create their own dmabufs,
in case they can’t import the one provided by the client directly but
know how to convert it into a format they can render.

Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>

Differential Revision: https://phabricator.freedesktop.org/D332
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 4f9bbaf..ea6f3cd 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -983,14 +983,14 @@
 		 * support a mix of gbm_bos and drmfbs.
 		 */
 		struct gbm_import_fd_data gbm_dmabuf = {
-			.fd     = dmabuf->dmabuf_fd[0],
-			.width  = dmabuf->width,
-			.height = dmabuf->height,
-			.stride = dmabuf->stride[0],
-			.format = dmabuf->format
+			.fd     = dmabuf->attributes.fd[0],
+			.width  = dmabuf->attributes.width,
+			.height = dmabuf->attributes.height,
+			.stride = dmabuf->attributes.stride[0],
+			.format = dmabuf->attributes.format
 		};
 
-		if (dmabuf->n_planes != 1 || dmabuf->offset[0] != 0)
+		if (dmabuf->attributes.n_planes != 1 || dmabuf->attributes.offset[0] != 0)
 			return NULL;
 
 		bo = gbm_bo_import(b->gbm, GBM_BO_IMPORT_FD, &gbm_dmabuf,