summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_framebuffer.h
diff options
context:
space:
mode:
authorVille Syrjälä2016-11-18 20:52:55 +0100
committerVille Syrjälä2016-12-15 13:55:29 +0100
commite14c23c647abfc1fed96a55ba376cd9675a54098 (patch)
treec041a530663bebd1b44348aa8d9a9d7caa2f0f2f /include/drm/drm_framebuffer.h
parentdrm: Populate fb->dev from drm_helper_mode_fill_fb_struct() (diff)
downloadkernel-qcow2-linux-e14c23c647abfc1fed96a55ba376cd9675a54098.tar.gz
kernel-qcow2-linux-e14c23c647abfc1fed96a55ba376cd9675a54098.tar.xz
kernel-qcow2-linux-e14c23c647abfc1fed96a55ba376cd9675a54098.zip
drm: Store a pointer to drm_format_info under drm_framebuffer
To avoid having to look up the format information struct every time, let's just store a pointer to it under drm_framebuffer. v2: Don't populate the fb->format pointer in drm_framebuffer_init(). instead we'll treat a NULL format as an error later Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1) Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-20-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include/drm/drm_framebuffer.h')
-rw-r--r--include/drm/drm_framebuffer.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/drm_framebuffer.h b/include/drm/drm_framebuffer.h
index 1ddfa2928802..a3d2f25230a8 100644
--- a/include/drm/drm_framebuffer.h
+++ b/include/drm/drm_framebuffer.h
@@ -122,6 +122,10 @@ struct drm_framebuffer {
*/
struct drm_mode_object base;
/**
+ * @format: framebuffer format information
+ */
+ const struct drm_format_info *format;
+ /**
* @funcs: framebuffer vfunc table
*/
const struct drm_framebuffer_funcs *funcs;