]> Pileus Git - ~andy/linux/commitdiff
drm: tegra: Use framebuffer pitch as line stride
authorThierry Reding <thierry.reding@avionic-design.de>
Thu, 22 Nov 2012 19:37:17 +0000 (19:37 +0000)
committerDave Airlie <airlied@redhat.com>
Wed, 28 Nov 2012 10:05:46 +0000 (20:05 +1000)
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 <thierry.reding@avionic-design.de>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Mark Zhang <markz@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/tegra/dc.c

index 53b98520ebd63fa78fad4f1e47177b24e268bfff..54f05d887dcee690fff518fa6d1b432350e5a7cb 100644 (file)
@@ -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);