aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i2c
diff options
context:
space:
mode:
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>2013-08-14 15:43:32 -0400
committerDave Airlie <airlied@redhat.com>2013-08-18 19:10:48 -0400
commit179f1aa407b466c06a94f9e54abc948d1e1146e7 (patch)
tree0f9b9ac75dfe2098cfffa8dff11cb44f2ab760b7 /drivers/gpu/drm/i2c
parent088d61d1fdfde56850c157138a6dc08880c1853d (diff)
drm/i2c: tda998x: prepare for broken sync workaround
Some LCD controller cannot provide valid VESA style sync, i.e. coincident HS/VS edges. First, this patch adds hskew passed from the adjusted_mode to reference pixel calculation to allow those controllers to add an offset relative to the expected reference pixel. Signed-off-by: Darren Etheridge <detheridge@ti.com> Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Tested-by: Russell King <rmk_kernel@arm.linux.org.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i2c')
-rw-r--r--drivers/gpu/drm/i2c/tda998x_drv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 92fcb3deae22..c2bd711e86e9 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -782,6 +782,14 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder,
782 de_pix_s = mode->htotal - mode->hdisplay; 782 de_pix_s = mode->htotal - mode->hdisplay;
783 ref_pix = 3 + hs_pix_s; 783 ref_pix = 3 + hs_pix_s;
784 784
785 /*
786 * Attached LCD controllers may generate broken sync. Allow
787 * those to adjust the position of the rising VS edge by adding
788 * HSKEW to ref_pix.
789 */
790 if (adjusted_mode->flags & DRM_MODE_FLAG_HSKEW)
791 ref_pix += adjusted_mode->hskew;
792
785 if ((mode->flags & DRM_MODE_FLAG_INTERLACE) == 0) { 793 if ((mode->flags & DRM_MODE_FLAG_INTERLACE) == 0) {
786 ref_line = 1 + mode->vsync_start - mode->vdisplay; 794 ref_line = 1 + mode->vsync_start - mode->vdisplay;
787 vwin1_line_s = mode->vtotal - mode->vdisplay - 1; 795 vwin1_line_s = mode->vtotal - mode->vdisplay - 1;