drm/exynos: Fix HDMI for smaller resolutions
authorSean Paul <seanpaul@chromium.org>
Tue, 14 Aug 2012 23:57:43 +0000 (16:57 -0700)
committerGerrit <chrome-bot@google.com>
Wed, 15 Aug 2012 00:57:26 +0000 (17:57 -0700)
This patch fixes HDMI output for resolutions smaller than the LCD. The
problem is that the pitch is slightly larger than the LCD width, which
results in the HDMI scanout being slighlty too large. This shifts each
line right by the difference between pitch and width resulting in a
corrupted screen.

BUG=chrome-os-partner:12606
TEST=Tested on snow with 720p/480p

Change-Id: I1764b0c3d4c699a9a87f083ce74331f99f0bc387
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30351
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
drivers/gpu/drm/exynos/exynos_mixer.c

index 831007f..5994764 100644 (file)
@@ -693,7 +693,7 @@ static void mixer_win_mode_set(void *ctx,
 
        win_data->fb_x = overlay->fb_x;
        win_data->fb_y = overlay->fb_y;
-       win_data->fb_width = overlay->fb_width;
+       win_data->fb_width = overlay->fb_pitch / (overlay->bpp >> 3);
        win_data->fb_height = overlay->fb_height;
 
        win_data->mode_width = overlay->mode_width;