Skip to content

Commit

Permalink
drm: tegra: Use framebuffer pitch as line stride
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thierry Reding authored and Dave Airlie committed Nov 28, 2012
1 parent 82fe50b commit ac8f7c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/tegra/dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ac8f7c4

Please sign in to comment.