diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-11-18 22:52:54 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-12-15 15:55:29 +0300 |
commit | 95bce76015819e546528c13fe25d31771427c9d5 (patch) | |
tree | a9174c6399227ee146cfba4b4115d53cb6b009f4 /drivers/gpu/drm/drm_modeset_helper.c | |
parent | d2e9f5fcc646d3b2e41cfef79b3c8e720d28e230 (diff) | |
download | linux-95bce76015819e546528c13fe25d31771427c9d5.tar.xz |
drm: Populate fb->dev from drm_helper_mode_fill_fb_struct()
Populating fb->dev before drm_framebuffer_init() allows us to use
fb->dev already while validating the framebuffer. Let's have
drm_helper_mode_fill_fb_struct() do that for us.
Also make drm_framebuffer_init() warn us if a different device
pointer is passed to it than was passed to
drm_helper_mode_fill_fb_struct().
v2: Reject fbs with invalid fb->dev (Laurent)
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-19-git-send-email-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_modeset_helper.c')
-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 285ffcba0fe8..57a319e3f780 100644 --- a/drivers/gpu/drm/drm_modeset_helper.c +++ b/drivers/gpu/drm/drm_modeset_helper.c @@ -90,6 +90,7 @@ void drm_helper_mode_fill_fb_struct(struct drm_device *dev, fb->bits_per_pixel = info->cpp[0] * 8; } + fb->dev = dev; fb->width = mode_cmd->width; fb->height = mode_cmd->height; for (i = 0; i < 4; i++) { |