From: Thierry Reding Date: Thu, 22 Nov 2012 19:37:17 +0000 (+0000) Subject: drm: tegra: Use framebuffer pitch as line stride X-Git-Tag: v3.8-rc1~42^2~132 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac8f7c4894bea3ae1af31e78fea31b1ba3347834;p=profile%2Fivi%2Fkernel-x86-ivi.git drm: tegra: Use framebuffer pitch as line stride Instead of using the stride derived from the display mode, use the pitch associated with the currently active framebuffer. This fixes a bug where the LCD display content would be skewed when enabling HDMI with a video mode different from that of the LCD. Signed-off-by: Thierry Reding Tested-by: Terje Bergstrom Tested-by: Mark Zhang Tested-by: Stephen Warren Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 53b9852..54f05d8 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -218,7 +218,7 @@ static int tegra_crtc_mode_set(struct drm_crtc *crtc, } bpp = crtc->fb->bits_per_pixel / 8; - win.stride = win.outw * bpp; + win.stride = crtc->fb->pitches[0]; /* program window registers */ value = tegra_dc_readl(dc, DC_CMD_DISPLAY_WINDOW_HEADER);