提交 40495089 编写于 作者: L Lucas Stach 提交者: Dave Airlie

drm: tegra: fix front_porch <-> back_porch mixup

Fixes wrong picture offset observed when using HDMI output with a
Technisat HD TV.
Signed-off-by: NLucas Stach <dev@lynxeye.de>
Acked-by: NMark Zhang <markz@nvidia.com>
Tested-by: NMark Zhang <markz@nvidia.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 8be0e5c4
...@@ -102,12 +102,12 @@ static int tegra_dc_set_timings(struct tegra_dc *dc, ...@@ -102,12 +102,12 @@ static int tegra_dc_set_timings(struct tegra_dc *dc,
((mode->hsync_end - mode->hsync_start) << 0); ((mode->hsync_end - mode->hsync_start) << 0);
tegra_dc_writel(dc, value, DC_DISP_SYNC_WIDTH); tegra_dc_writel(dc, value, DC_DISP_SYNC_WIDTH);
value = ((mode->vsync_start - mode->vdisplay) << 16) |
((mode->hsync_start - mode->hdisplay) << 0);
tegra_dc_writel(dc, value, DC_DISP_BACK_PORCH);
value = ((mode->vtotal - mode->vsync_end) << 16) | value = ((mode->vtotal - mode->vsync_end) << 16) |
((mode->htotal - mode->hsync_end) << 0); ((mode->htotal - mode->hsync_end) << 0);
tegra_dc_writel(dc, value, DC_DISP_BACK_PORCH);
value = ((mode->vsync_start - mode->vdisplay) << 16) |
((mode->hsync_start - mode->hdisplay) << 0);
tegra_dc_writel(dc, value, DC_DISP_FRONT_PORCH); tegra_dc_writel(dc, value, DC_DISP_FRONT_PORCH);
value = (mode->vdisplay << 16) | mode->hdisplay; value = (mode->vdisplay << 16) | mode->hdisplay;
......
...@@ -479,7 +479,7 @@ static void tegra_hdmi_setup_avi_infoframe(struct tegra_hdmi *hdmi, ...@@ -479,7 +479,7 @@ static void tegra_hdmi_setup_avi_infoframe(struct tegra_hdmi *hdmi,
return; return;
} }
h_front_porch = mode->htotal - mode->hsync_end; h_front_porch = mode->hsync_start - mode->hdisplay;
memset(&frame, 0, sizeof(frame)); memset(&frame, 0, sizeof(frame));
frame.r = HDMI_AVI_R_SAME; frame.r = HDMI_AVI_R_SAME;
...@@ -634,8 +634,8 @@ static int tegra_output_hdmi_enable(struct tegra_output *output) ...@@ -634,8 +634,8 @@ static int tegra_output_hdmi_enable(struct tegra_output *output)
pclk = mode->clock * 1000; pclk = mode->clock * 1000;
h_sync_width = mode->hsync_end - mode->hsync_start; h_sync_width = mode->hsync_end - mode->hsync_start;
h_front_porch = mode->htotal - mode->hsync_end; h_back_porch = mode->htotal - mode->hsync_end;
h_back_porch = mode->hsync_start - mode->hdisplay; h_front_porch = mode->hsync_start - mode->hdisplay;
err = regulator_enable(hdmi->vdd); err = regulator_enable(hdmi->vdd);
if (err < 0) { if (err < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册