summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/tegra
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2012-11-22 19:37:17 +0000
committerDave Airlie <airlied@redhat.com>2012-11-28 20:05:46 +1000
commitac8f7c4894bea3ae1af31e78fea31b1ba3347834 (patch)
tree08dcff8981edb53ad264bec847996d83a97adb27 /drivers/gpu/drm/tegra
parent82fe50bcc87e508e85250c87b745296a36a07897 (diff)
downloadlinux-ac8f7c4894bea3ae1af31e78fea31b1ba3347834.tar.bz2
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 <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>
Diffstat (limited to 'drivers/gpu/drm/tegra')
-rw-r--r--drivers/gpu/drm/tegra/dc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 53b98520ebd6..54f05d887dce 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);