From mboxrd@z Thu Jan 1 00:00:00 1970 From: Darren Etheridge Subject: [PATCH 1/2] drm/i2c/tda998x prepare for tilcdc sync workaround Date: Thu, 25 Jul 2013 13:32:17 -0500 Message-ID: <1374777138-22567-2-git-send-email-detheridge@ti.com> References: <1374777138-22567-1-git-send-email-detheridge@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by gabe.freedesktop.org (Postfix) with ESMTP id A229BE5F91 for ; Thu, 25 Jul 2013 11:58:56 -0700 (PDT) In-Reply-To: <1374777138-22567-1-git-send-email-detheridge@ti.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: detheridge@ti.com, robdclark@gmail.com, airlied@linux.ie, linux@arm.linux.org.uk, sebastian.hesselbarth@gmail.com Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org 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 --- 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