From patchwork Thu Jul 25 18:32:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Etheridge, Darren" X-Patchwork-Id: 2833655 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6A84A9F4E2 for ; Thu, 25 Jul 2013 19:01:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41C2C2049B for ; Thu, 25 Jul 2013 19:01:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2A7D820499 for ; Thu, 25 Jul 2013 19:01:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 989B8E62A1 for ; Thu, 25 Jul 2013 12:01:11 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org 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) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id r6PIwifB021695; Thu, 25 Jul 2013 13:58:44 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r6PIwiqr025393; Thu, 25 Jul 2013 13:58:44 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Thu, 25 Jul 2013 13:58:44 -0500 Received: from localhost.localdomain (sdit-build03.sc.ti.com [128.247.24.118]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r6PIwh1H027329; Thu, 25 Jul 2013 13:58:44 -0500 From: Darren Etheridge To: , , , , 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> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1374777138-22567-1-git-send-email-detheridge@ti.com> References: <1374777138-22567-1-git-send-email-detheridge@ti.com> MIME-Version: 1.0 Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;