summary refs log tree commit diff
path: root/include/drm/drm_framebuffer.h
diff options
context:
space:
mode:
authorNoralf Trønnes <noralf@tronnes.org>2017-08-13 15:31:44 +0200
committerNoralf Trønnes <noralf@tronnes.org>2017-08-16 21:32:23 +0200
commit4c3dbb2c312c9fafbac30d98c523b8b1f3455d78 (patch)
tree901be83c520677157cb770881c39e472c99305c4 /include/drm/drm_framebuffer.h
parentd956e1293b9b43f3a9a508162cdbaa96cf02e6e0 (diff)
downloadlinux-4c3dbb2c312c9fafbac30d98c523b8b1f3455d78.tar.gz
drm: Add GEM backed framebuffer library
This library provides helpers for drivers that don't subclass
drm_framebuffer and are backed by drm_gem_object. The code is
taken from drm_fb_cma_helper.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1502631125-13557-2-git-send-email-noralf@tronnes.org
Diffstat (limited to 'include/drm/drm_framebuffer.h')
-rw-r--r--include/drm/drm_framebuffer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/drm/drm_framebuffer.h b/include/drm/drm_framebuffer.h
index 5244f059d23a..b6996ddb19d6 100644
--- a/include/drm/drm_framebuffer.h
+++ b/include/drm/drm_framebuffer.h
@@ -190,6 +190,13 @@ struct drm_framebuffer {
 	 * @filp_head: Placed on &drm_file.fbs, protected by &drm_file.fbs_lock.
 	 */
 	struct list_head filp_head;
+	/**
+	 * @obj: GEM objects backing the framebuffer, one per plane (optional).
+	 *
+	 * This is used by the GEM framebuffer helpers, see e.g.
+	 * drm_gem_fb_create().
+	 */
+	struct drm_gem_object *obj[4];
 };
 
 #define obj_to_fb(x) container_of(x, struct drm_framebuffer, base)