From patchwork Mon Dec 2 15:39:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 3272541 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6DE00C0D4A for ; Tue, 3 Dec 2013 02:11:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8C6FE201BC for ; Tue, 3 Dec 2013 02:11:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9FE332017B for ; Tue, 3 Dec 2013 02:11:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C5FEFAFF2; Mon, 2 Dec 2013 18:11:00 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by gabe.freedesktop.org (Postfix) with ESMTP id 142B4FAC3A for ; Mon, 2 Dec 2013 07:52:09 -0800 (PST) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3dY9VX6D5Gz4KKW3; Mon, 2 Dec 2013 16:39:32 +0100 (CET) X-Auth-Info: PugxqACDyiCP2wRveVOgsmf6wdQ4tV72+b01Cv4OMQ8= Received: from chi.marex.prg (host-82-135-33-74.customer.m-online.net [82.135.33.74]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 3dY9VX5DQ1zbbfn; Mon, 2 Dec 2013 16:39:32 +0100 (CET) From: Marek Vasut To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] drm: Add LCD display clock polarity flags Date: Mon, 2 Dec 2013 16:39:26 +0100 Message-Id: <1385998768-23512-1-git-send-email-marex@denx.de> X-Mailer: git-send-email 1.8.4.2 X-Mailman-Approved-At: Mon, 02 Dec 2013 18:10:58 -0800 Cc: devel@driverdev.osuosl.org, Marek Vasut , Greg Kroah-Hartman , 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: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@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 DRM flags for the LCD display clock polarity so the pixelclk-active DT property can be properly handled by drivers using the DRM API. Signed-off-by: Marek Vasut Cc: Dave Airlie Cc: Greg Kroah-Hartman Cc: Philipp Zabel Cc: Sascha Hauer Cc: Shawn Guo --- drivers/gpu/drm/drm_modes.c | 5 +++++ include/uapi/drm/drm_mode.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 85071a1..d1f3bfc 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -537,6 +537,11 @@ 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_PIXDATA_POSEDGE) + dmode->flags |= DRM_MODE_FLAG_PIXELCLK_PPOL; + else if (vm->flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE) + dmode->flags |= DRM_MODE_FLAG_PIXELCLK_NPOL; + drm_mode_set_name(dmode); return 0; diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index f104c26..a6169ca 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -73,6 +73,9 @@ #define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7<<14) #define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8<<14) +/* CRTC LCD clock polarity flags. */ +#define DRM_MODE_FLAG_PIXELCLK_PPOL (1<<19) +#define DRM_MODE_FLAG_PIXELCLK_NPOL (1<<20) /* DPMS flags */ /* bit compatible with the xorg definitions. */