diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-11-18 21:52:55 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-12-15 14:55:29 +0200 |
commit | e14c23c647abfc1fed96a55ba376cd9675a54098 (patch) | |
tree | c041a530663bebd1b44348aa8d9a9d7caa2f0f2f /drivers/gpu | |
parent | 95bce76015819e546528c13fe25d31771427c9d5 (diff) | |
download | op-kernel-dev-e14c23c647abfc1fed96a55ba376cd9675a54098.zip op-kernel-dev-e14c23c647abfc1fed96a55ba376cd9675a54098.tar.gz |
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 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_modeset_helper.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_modeset_helper.c b/drivers/gpu/drm/drm_modeset_helper.c index 57a319e..1aa5e3b 100644 --- a/drivers/gpu/drm/drm_modeset_helper.c +++ b/drivers/gpu/drm/drm_modeset_helper.c @@ -91,6 +91,7 @@ void drm_helper_mode_fill_fb_struct(struct drm_device *dev, } fb->dev = dev; + fb->format = info; fb->width = mode_cmd->width; fb->height = mode_cmd->height; for (i = 0; i < 4; i++) { |