CHROMIUM: drm/exynos: fbdev: Set visible dimensions correctly
authorDaniel Kurtz <djkurtz@chromium.org>
Thu, 3 Jan 2013 02:37:06 +0000 (10:37 +0800)
committerChromeBot <chrome-bot@google.com>
Sat, 5 Jan 2013 08:11:51 +0000 (00:11 -0800)
When probing the fbdev, the drm_fb_helper may specify a visible area
(fb_width x fb_height) than is smaller than the total requested
framebuffer area (surface_width x surface_height).

Use these fb dimensions when setting the visible area in the "variable"
portion of the fb info.  This is consistent with other drm fbdev drivers
(i915, radeon, nouveau).

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=splash screen displayed properly at boot w/ no HDMI
TEST=splash screen displayed properly at boot w/ HDMI

Change-Id: Id209ea395a7e5eb993632ae4cfe4263b5af18138
Reviewed-on: https://gerrit.chromium.org/gerrit/40443
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
drivers/gpu/drm/exynos/exynos_drm_fbdev.c

index e3c4826..ec66326 100644 (file)
@@ -74,7 +74,9 @@ static struct fb_ops exynos_drm_fb_ops = {
 };
 
 static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
-                                    struct drm_framebuffer *fb)
+                                    struct drm_framebuffer *fb,
+                                    unsigned int fb_width,
+                                    unsigned int fb_height)
 {
        struct fb_info *fbi = helper->fbdev;
        struct drm_device *dev = helper->dev;
@@ -85,7 +87,7 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
        DRM_DEBUG_KMS("%s\n", __FILE__);
 
        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, fb_width, fb_height);
 
        /* RGB formats use only one buffer */
        buffer = exynos_drm_fb_buffer(exynos_fb, 0);
@@ -169,7 +171,8 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
                goto out;
        }
 
-       ret = exynos_drm_fbdev_update(helper, helper->fb);
+       ret = exynos_drm_fbdev_update(helper, helper->fb, sizes->fb_width,
+                       sizes->fb_height);
        if (ret < 0) {
                fb_dealloc_cmap(&fbi->cmap);
                goto out;