linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm: tegra: Use framebuffer pitch as line stride
@ 2012-11-22 19:37 Thierry Reding
       [not found] ` <1353613037-15808-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
  0 siblings, 1 reply; 13+ messages in thread
From: Thierry Reding @ 2012-11-22 19:37 UTC (permalink / raw)
  To: Dave Airlie
  Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Marc Dietrich

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-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
---
 drivers/gpu/drm/tegra/dc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 94686e5..41cde76 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);
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2012-12-04  4:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-22 19:37 [PATCH] drm: tegra: Use framebuffer pitch as line stride Thierry Reding
     [not found] ` <1353613037-15808-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-11-23  5:54   ` Terje Bergström
2012-11-23  8:11   ` Terje Bergström
2012-11-26  7:01   ` Mark Zhang
2012-11-26 22:37   ` Stephen Warren
     [not found]     ` <50B3EF29.6000308-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-11-27  3:16       ` Mark Zhang
     [not found]         ` <50B43096.4060302-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-27 18:17           ` Stephen Warren
     [not found]             ` <50B503C5.6010208-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-11-27 21:39               ` Stephen Warren
     [not found]                 ` <50B53312.7040000-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-11-27 21:57                   ` Lucas Stach
2012-11-28  6:37                   ` Mark Zhang
     [not found]                     ` <50B5B120.1090902-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-04  3:00                       ` Mark Zhang
     [not found]                         ` <50BD6753.20404-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-12-04  3:50                           ` Stephen Warren
     [not found]                             ` <50BD72EB.5010107-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-12-04  4:11                               ` Mark Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).