Add necessary support for flipping the hsync signal and shifting
the display to the right by a certain number of pixels.  Changes
only take effect if adjusted_mode is changed in fixup function.

Signed-off-by: Darren Etheridge <detheri...@ti.com>
---
 drivers/gpu/drm/i2c/tda998x_drv.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c 
b/drivers/gpu/drm/i2c/tda998x_drv.c
index e384b59..ad870e6 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -778,6 +778,16 @@ tda998x_encoder_mode_set(struct drm_encoder *encoder,
        n_line       = mode->vtotal;
 
        ref_pix      = 3 + mode->hsync_start - mode->hdisplay;
+
+       /*
+        * handle issue on TILCDC where it is outputing
+        * non-VESA compliant sync signals the workaround
+        * forces us to invert the HSYNC, so need to adjust display to
+        * the left by hskew pixels, provided by the tilcdc driver
+        */
+       if (adjusted_mode->flags & DRM_MODE_FLAG_HSKEW)
+               ref_pix += adjusted_mode->hskew;
+
        de_pix_s     = mode->htotal - mode->hdisplay;
        de_pix_e     = de_pix_s + mode->hdisplay;
        hs_pix_s     = mode->hsync_start - mode->hdisplay;
-- 
1.7.0.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to