From patchwork Mon Apr 18 20:38:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 8874991 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 763EFBF440 for ; Mon, 18 Apr 2016 20:37:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1ACE201ED for ; Mon, 18 Apr 2016 20:37:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 47E5C200F2 for ; Mon, 18 Apr 2016 20:37:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1CCE46E641; Mon, 18 Apr 2016 20:37:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kmu-office.ch (mail.kmu-office.ch [IPv6:2a02:418:6a02::a2]) by gabe.freedesktop.org (Postfix) with ESMTPS id C2B016E551 for ; Mon, 18 Apr 2016 20:37:32 +0000 (UTC) Received: from trochilidae.toradex.int (75-146-58-181-Washington.hfc.comcastbusiness.net [75.146.58.181]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 746E45C0F37; Mon, 18 Apr 2016 22:35:55 +0200 (CEST) From: Stefan Agner To: dri-devel@lists.freedesktop.org, thierry.reding@gmail.com Subject: [PATCH v3 1/2] drm: introduce bus_flags in drm_display_info Date: Mon, 18 Apr 2016 13:38:14 -0700 Message-Id: <1461011895-23608-2-git-send-email-stefan@agner.ch> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1461011895-23608-1-git-send-email-stefan@agner.ch> References: <1461011895-23608-1-git-send-email-stefan@agner.ch> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1461011758; bh=AnyKyE+8KXCoOJpZcpxZwbiQTrEOfCE1PyVipj3UImA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=cxTAB143172Jt2QgHN/fo0xlS2h6o7pQtBu69c/tpE63CQ7IC+85o7EJ+1U67d0a22CFqZs37HKeIQUeOKcMx7KwmgY7aQZPc0rrvCtq3os9XcVlVqv5tK/E9YMU4KCcMVegJ3OJC43UdiDNThVOXziNRn3Ga1AUBTVnH+t4jko= Cc: jianwei.wang.chn@gmail.com, meng.yi@nxp.com, linux@arm.linux.org.uk, eric@eukrea.com, alison.wang@freescale.com, daniel.vetter@ffwll.ch, linux-kernel@vger.kernel.org, denis@eukrea.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Introduce bus_flags to specify display bus properties like signal polarities. This is useful for parallel display buses, e.g. to specify the pixel clock or data enable polarity. Suggested-by: Thierry Reding Acked-by: Philipp Zabel Acked-by: Manfred Schlaegl Signed-off-by: Stefan Agner Acked-by: Daniel Vetter --- drivers/gpu/drm/panel/panel-simple.c | 2 ++ include/drm/drm_crtc.h | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index ceb2048..77ae07f 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -72,6 +72,7 @@ struct panel_desc { } delay; u32 bus_format; + u32 bus_flags; }; struct panel_simple { @@ -144,6 +145,7 @@ static int panel_simple_get_fixed_modes(struct panel_simple *panel) if (panel->desc->bus_format) drm_display_info_set_bus_formats(&connector->display_info, &panel->desc->bus_format, 1); + connector->display_info.bus_flags = panel->desc->bus_flags; return num; } diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index e0170bf..f8b37be 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -126,6 +126,14 @@ enum subpixel_order { #define DRM_COLOR_FORMAT_RGB444 (1<<0) #define DRM_COLOR_FORMAT_YCRCB444 (1<<1) #define DRM_COLOR_FORMAT_YCRCB422 (1<<2) + +#define DRM_BUS_FLAG_DE_LOW (1<<0) +#define DRM_BUS_FLAG_DE_HIGH (1<<1) +/* drive data on pos. edge */ +#define DRM_BUS_FLAG_PIXDATA_POSEDGE (1<<2) +/* drive data on neg. edge */ +#define DRM_BUS_FLAG_PIXDATA_NEGEDGE (1<<3) + /* * Describes a given display (e.g. CRT or flat panel) and its limitations. */ @@ -147,6 +155,7 @@ struct drm_display_info { const u32 *bus_formats; unsigned int num_bus_formats; + u32 bus_flags; /* Mask of supported hdmi deep color modes */ u8 edid_hdmi_dc_modes;