aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2015-07-30 12:47:07 -0400
committerThierry Reding <treding@nvidia.com>2015-08-13 07:47:56 -0400
commit51511d05defe92715c19c3e583c9d1ac1c82e1e6 (patch)
treeed99b1b09875c65286362cf4f55672a9cc6a22dd
parent8044449556338fb27b1a03f6b1dbbdbc59e4ebfa (diff)
drm/tegra: sor: Write correct head state registers
The head state registers are per head, so they must be properly indexed. This has worked fine so far because all boards with eDP use it as the primary output, so it is very likely to end up attached to head 0. Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/drm/tegra/sor.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index 677bb78a9210..d69575d2cdc7 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -1304,25 +1304,27 @@ static void tegra_sor_encoder_mode_set(struct drm_encoder *encoder,
1304 */ 1304 */
1305 1305
1306 value = ((mode->vtotal & 0x7fff) << 16) | (mode->htotal & 0x7fff); 1306 value = ((mode->vtotal & 0x7fff) << 16) | (mode->htotal & 0x7fff);
1307 tegra_sor_writel(sor, value, SOR_HEAD_STATE1(0)); 1307 tegra_sor_writel(sor, value, SOR_HEAD_STATE1(dc->pipe));
1308 1308
1309 vse = mode->vsync_end - mode->vsync_start - 1; 1309 vse = mode->vsync_end - mode->vsync_start - 1;
1310 hse = mode->hsync_end - mode->hsync_start - 1; 1310 hse = mode->hsync_end - mode->hsync_start - 1;
1311 1311
1312 value = ((vse & 0x7fff) << 16) | (hse & 0x7fff); 1312 value = ((vse & 0x7fff) << 16) | (hse & 0x7fff);
1313 tegra_sor_writel(sor, value, SOR_HEAD_STATE2(0)); 1313 tegra_sor_writel(sor, value, SOR_HEAD_STATE2(dc->pipe));
1314 1314
1315 vbe = vse + (mode->vsync_start - mode->vdisplay); 1315 vbe = vse + (mode->vsync_start - mode->vdisplay);
1316 hbe = hse + (mode->hsync_start - mode->hdisplay); 1316 hbe = hse + (mode->hsync_start - mode->hdisplay);
1317 1317
1318 value = ((vbe & 0x7fff) << 16) | (hbe & 0x7fff); 1318 value = ((vbe & 0x7fff) << 16) | (hbe & 0x7fff);
1319 tegra_sor_writel(sor, value, SOR_HEAD_STATE3(0)); 1319 tegra_sor_writel(sor, value, SOR_HEAD_STATE3(dc->pipe));
1320 1320
1321 vbs = vbe + mode->vdisplay; 1321 vbs = vbe + mode->vdisplay;
1322 hbs = hbe + mode->hdisplay; 1322 hbs = hbe + mode->hdisplay;
1323 1323
1324 value = ((vbs & 0x7fff) << 16) | (hbs & 0x7fff); 1324 value = ((vbs & 0x7fff) << 16) | (hbs & 0x7fff);
1325 tegra_sor_writel(sor, value, SOR_HEAD_STATE4(0)); 1325 tegra_sor_writel(sor, value, SOR_HEAD_STATE4(dc->pipe));
1326
1327 tegra_sor_writel(sor, 0x1, SOR_HEAD_STATE5(dc->pipe));
1326 1328
1327 /* CSTM (LVDS, link A/B, upper) */ 1329 /* CSTM (LVDS, link A/B, upper) */
1328 value = SOR_CSTM_LVDS | SOR_CSTM_LINK_ACT_A | SOR_CSTM_LINK_ACT_B | 1330 value = SOR_CSTM_LVDS | SOR_CSTM_LINK_ACT_A | SOR_CSTM_LINK_ACT_B |