drm/exynos: use correct fb width/height
authorRob Clark <robdclark@gmail.com>
Wed, 11 Mar 2015 14:23:11 +0000 (10:23 -0400)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 11 Mar 2015 21:08:17 +0000 (22:08 +0100)
What is passed to drm_fb_helper_fill_var() should be fb_width/fb_height,
rather than the surface size.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/exynos/exynos_drm_fbdev.c

index 84f8dfe1c5ec02ec383b0d74cf615b7906388d9a..e71e331f0188c009f56bffe1fa81b2ec0be29164 100644 (file)
@@ -76,6 +76,7 @@ static struct fb_ops exynos_drm_fb_ops = {
 };
 
 static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
+                                    struct drm_fb_helper_surface_size *sizes,
                                     struct drm_framebuffer *fb)
 {
        struct fb_info *fbi = helper->fbdev;
@@ -85,7 +86,7 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
        unsigned long offset;
 
        drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->depth);
-       drm_fb_helper_fill_var(fbi, helper, fb->width, fb->height);
+       drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);
 
        /* RGB formats use only one buffer */
        buffer = exynos_drm_fb_buffer(fb, 0);
@@ -189,7 +190,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
                goto err_destroy_framebuffer;
        }
 
-       ret = exynos_drm_fbdev_update(helper, helper->fb);
+       ret = exynos_drm_fbdev_update(helper, sizes, helper->fb);
        if (ret < 0)
                goto err_dealloc_cmap;