From: Daniel Kurtz Date: Thu, 3 Jan 2013 02:37:06 +0000 (+0800) Subject: CHROMIUM: drm/exynos: fbdev: Set visible dimensions correctly X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b1cbd07882e4d1e160c64153ccd42b4e09394e7d;p=people%2Faperard%2Flinux-chromebook.git CHROMIUM: drm/exynos: fbdev: Set visible dimensions correctly 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 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 Commit-Queue: Daniel Kurtz Reviewed-by: Daniel Kurtz Tested-by: Daniel Kurtz --- diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c index e3c4826396bd6..ec663260a5949 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c @@ -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;