From patchwork Thu Oct 17 15:02:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Denis Carikli X-Patchwork-Id: 3061601 Return-Path: X-Original-To: patchwork-linux-arm@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 7621B9F440 for ; Thu, 17 Oct 2013 15:37:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D591F204D6 for ; Thu, 17 Oct 2013 15:37:52 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B178720377 for ; Thu, 17 Oct 2013 15:37:47 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWpEq-0006no-AR; Thu, 17 Oct 2013 15:11:49 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWpE5-0000KP-Jz; Thu, 17 Oct 2013 15:11:01 +0000 Received: from smtp4-g21.free.fr ([212.27.42.4]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VWpBU-00006b-S9 for linux-arm-kernel@lists.infradead.org; Thu, 17 Oct 2013 15:08:25 +0000 Received: from denis-N73SV.local.eukrea.com (unknown [88.170.243.169]) by smtp4-g21.free.fr (Postfix) with ESMTP id E59004C816E; Thu, 17 Oct 2013 17:02:53 +0200 (CEST) From: Denis Carikli To: Sascha Hauer Subject: [Patch v2][ 03/37] drm: Add the lacking DRM_MODE_FLAG_* for matching the DISPLAY_FLAGS_* Date: Thu, 17 Oct 2013 17:02:01 +0200 Message-Id: <1382022155-21954-4-git-send-email-denis@eukrea.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1382022155-21954-1-git-send-email-denis@eukrea.com> References: <1382022155-21954-1-git-send-email-denis@eukrea.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131017_110821_552497_6A1A363B X-CRM114-Status: GOOD ( 11.08 ) X-Spam-Score: -1.2 (-) Cc: Fabio Estevam , David Airlie , Greg Kroah-Hartman , driverdev-devel@linuxdriverproject.org, dri-devel@lists.freedesktop.org, Denis Carikli , =?UTF-8?q?Eric=20B=C3=A9nard?= , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 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 Without that fix, drivers using the drm_display_mode_from_videomode function will not be able to get certain information because some DISPLAY_FLAGS_* have no corresponding DRM_MODE_FLAG_*. Cc: Greg Kroah-Hartman Cc: driverdev-devel@linuxdriverproject.org Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: Fabio Estevam Cc: Sascha Hauer Cc: linux-arm-kernel@lists.infradead.org Cc: Eric BĂ©nard Signed-off-by: Denis Carikli --- drivers/gpu/drm/drm_modes.c | 9 +++++++++ include/uapi/drm/drm_mode.h | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index b073315..353aaae 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -537,6 +537,15 @@ int drm_display_mode_from_videomode(const struct videomode *vm, dmode->flags |= DRM_MODE_FLAG_DBLSCAN; if (vm->flags & DISPLAY_FLAGS_DOUBLECLK) dmode->flags |= DRM_MODE_FLAG_DBLCLK; + if (vm->flags & DISPLAY_FLAGS_DE_LOW) + dmode->flags |= DRM_MODE_FLAG_NDATEN; + if (vm->flags & DISPLAY_FLAGS_DE_HIGH) + dmode->flags |= DRM_MODE_FLAG_PDATEN; + if (vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE) + dmode->flags |= DRM_MODE_FLAG_PPIXDATEDGE; + if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) + dmode->flags |= DRM_MODE_FLAG_NPIXDATEDGE; + drm_mode_set_name(dmode); return 0; diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index bafe612..13843c7 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -66,6 +66,10 @@ #define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (1<<19) #define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (1<<20) #define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (1<<21) +#define DRM_MODE_FLAG_PDATEN (1<<22) +#define DRM_MODE_FLAG_NDATEN (1<<23) +#define DRM_MODE_FLAG_PPIXDATEDGE (1<<24) +#define DRM_MODE_FLAG_NPIXDATEDGE (1<<25) /* DPMS flags */ /* bit compatible with the xorg definitions. */