Commit 3cb2f46b authored by Maxime Ripard's avatar Maxime Ripard

drm/sun4i: tcon: Fix tcon channel 1 backporch calculation

It seems like what's called a backporch in the datasheet is actually the
backporch plus the sync period. Fix that in our driver.
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
parent b7cb9b91
...@@ -269,7 +269,7 @@ void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon, ...@@ -269,7 +269,7 @@ void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon,
SUN4I_TCON1_BASIC2_Y(mode->crtc_vdisplay)); SUN4I_TCON1_BASIC2_Y(mode->crtc_vdisplay));
/* Set horizontal display timings */ /* Set horizontal display timings */
bp = mode->crtc_htotal - mode->crtc_hsync_end; bp = mode->crtc_htotal - mode->crtc_hsync_start;
DRM_DEBUG_DRIVER("Setting horizontal total %d, backporch %d\n", DRM_DEBUG_DRIVER("Setting horizontal total %d, backporch %d\n",
mode->htotal, bp); mode->htotal, bp);
regmap_write(tcon->regs, SUN4I_TCON1_BASIC3_REG, regmap_write(tcon->regs, SUN4I_TCON1_BASIC3_REG,
...@@ -277,7 +277,7 @@ void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon, ...@@ -277,7 +277,7 @@ void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon,
SUN4I_TCON1_BASIC3_H_BACKPORCH(bp)); SUN4I_TCON1_BASIC3_H_BACKPORCH(bp));
/* Set vertical display timings */ /* Set vertical display timings */
bp = mode->crtc_vtotal - mode->crtc_vsync_end; bp = mode->crtc_vtotal - mode->crtc_vsync_start;
DRM_DEBUG_DRIVER("Setting vertical total %d, backporch %d\n", DRM_DEBUG_DRIVER("Setting vertical total %d, backporch %d\n",
mode->vtotal, bp); mode->vtotal, bp);
regmap_write(tcon->regs, SUN4I_TCON1_BASIC4_REG, regmap_write(tcon->regs, SUN4I_TCON1_BASIC4_REG,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment