From patchwork Fri Sep 7 17:59:45 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 11254 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 96B4223E54 for ; Fri, 7 Sep 2012 18:00:06 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3E545A18EB8 for ; Fri, 7 Sep 2012 18:00:06 +0000 (UTC) Received: by ieak11 with SMTP id k11so5145194iea.11 for ; Fri, 07 Sep 2012 11:00:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=fvtiHKrjG2oPIdXhQXGLD1svlaPBUGCSSqrgNZIqaYk=; b=DBlJhDuw83BYPED2clxp/DuA37ZBsiv8QJ/wKbeChKEIr8kDrrGxtGyxgUJbeCCpjd ZI4plzSC4A6OBuBOvux0MeFfu2uW5dStBpjCZqAWsG4ZaOv6AVTbOMqU8LHuRP0/hFhR V6s7Dc0WdbXbuPGKFn+zgNC1lmLx4C/qWUsecBzKkOCcwl5Uf7OXvPTPDrYTwyQKZFd/ F52N3Zjmft7NQLxNno8Z1TdDmuAc9lMPNcXXVxMkYTgGiQtyZMZVVsI5Wriqynw6qiqK sMOU5hWyoJQV2LvR7RVHPTk1fuby/HUA1UKf9SbxwIHJqGB9/dS+XJKFS0Z7MbbvmC7A gBFw== Received: by 10.50.195.134 with SMTP id ie6mr9638483igc.28.1347040805672; Fri, 07 Sep 2012 11:00:05 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp392107igc; Fri, 7 Sep 2012 11:00:04 -0700 (PDT) Received: by 10.60.170.229 with SMTP id ap5mr6984152oec.101.1347040804424; Fri, 07 Sep 2012 11:00:04 -0700 (PDT) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id qd10si7773150obc.83.2012.09.07.11.00.03 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Sep 2012 11:00:04 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by obbwd20 with SMTP id wd20so5999280obb.37 for ; Fri, 07 Sep 2012 11:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer; bh=fvtiHKrjG2oPIdXhQXGLD1svlaPBUGCSSqrgNZIqaYk=; b=YQlxLoPCENoe7hX/3xuDY8kMtICVjSTxx64rKvwVsrg3bcW+YBBfRk6GwUBnkOKNmg i6U13BF2/FGsw7zq2A0Onf4RQA0FX0kD6dgATPrjr6e/KYtTXAn4ZcpMD9OEUQ7Rvy/C jMB54tBswlzBnN8xY6y1Qt8Pu1FxPyTXT4L+U/tVKIWTUdgStYoqsdRdyLb6XMrYPqzn iOmD7h3MALstKfENtXw0DVDnIzBxMVIyl3SaHOwppy7zbjzqKUSy7xDLL60PWK2nd6gH 7xjEUNF5g++CeMc6ToN2gXTFhg2bT2lQmKHuADovNYI02HsEcL79p9nXZT8SDF5ZoXEH W+lA== Received: by 10.182.169.105 with SMTP id ad9mr6947537obc.90.1347040803552; Fri, 07 Sep 2012 11:00:03 -0700 (PDT) Received: from localhost (ppp-70-129-131-42.dsl.rcsntx.swbell.net. [70.129.131.42]) by mx.google.com with ESMTPS id o4sm4221515oef.11.2012.09.07.11.00.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 07 Sep 2012 11:00:01 -0700 (PDT) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org Cc: patches@linaro.org, Greg KH , Tomi Valkeinen , Andy Gross , Rob Clark Subject: [PATCH] drm/omap: add more new timings fields Date: Fri, 7 Sep 2012 12:59:45 -0500 Message-Id: <1347040786-29156-1-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQko3GGug0+vKanRN2gZMz8YxzJn4zIUT9/CjSeipTCC4yUIbONuK7jRnGmW28xElhs25s/q From: Rob Clark Without these, DVI is broken. Signed-off-by: Rob Clark --- Greg, it looks like the omapdss changes which added these fields, as well as the interlaced field, where merged in Linux 3.5-rc5. So I think both this and the 'update for interlaced' patch are needed for both 3.6 and 3.5. drivers/staging/omapdrm/omap_connector.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/staging/omapdrm/omap_connector.c b/drivers/staging/omapdrm/omap_connector.c index 5f4a89b..55e9c86 100644 --- a/drivers/staging/omapdrm/omap_connector.c +++ b/drivers/staging/omapdrm/omap_connector.c @@ -52,6 +52,16 @@ static inline void copy_timings_omap_to_drm(struct drm_display_mode *mode, if (timings->interlace) mode->flags |= DRM_MODE_FLAG_INTERLACE; + + if (timings->hsync_level == OMAPDSS_SIG_ACTIVE_HIGH) + mode->flags |= DRM_MODE_FLAG_PHSYNC; + else + mode->flags |= DRM_MODE_FLAG_NHSYNC; + + if (timings->vsync_level == OMAPDSS_SIG_ACTIVE_HIGH) + mode->flags |= DRM_MODE_FLAG_PVSYNC; + else + mode->flags |= DRM_MODE_FLAG_NVSYNC; } static inline void copy_timings_drm_to_omap(struct omap_video_timings *timings, @@ -70,6 +80,20 @@ static inline void copy_timings_drm_to_omap(struct omap_video_timings *timings, timings->vbp = mode->vtotal - mode->vsync_end; timings->interlace = !!(mode->flags & DRM_MODE_FLAG_INTERLACE); + + if (mode->flags & DRM_MODE_FLAG_PHSYNC) + timings->hsync_level = OMAPDSS_SIG_ACTIVE_HIGH; + else + timings->hsync_level = OMAPDSS_SIG_ACTIVE_LOW; + + if (mode->flags & DRM_MODE_FLAG_PVSYNC) + timings->vsync_level = OMAPDSS_SIG_ACTIVE_HIGH; + else + timings->vsync_level = OMAPDSS_SIG_ACTIVE_LOW; + + timings->data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE; + timings->de_level = OMAPDSS_SIG_ACTIVE_HIGH; + timings->sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES; } static void omap_connector_dpms(struct drm_connector *connector, int mode)