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: 1424681 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id CB20F3FC85 for ; Fri, 7 Sep 2012 18:00:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753507Ab2IGSAG (ORCPT ); Fri, 7 Sep 2012 14:00:06 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:47471 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753444Ab2IGSAE (ORCPT ); Fri, 7 Sep 2012 14:00:04 -0400 Received: by obbuo13 with SMTP id uo13so5101505obb.19 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) 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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)