From patchwork Thu Nov 19 02:42:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 7654031 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 A9598BF90C for ; Thu, 19 Nov 2015 02:42:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 831D920443 for ; Thu, 19 Nov 2015 02:42:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 96CFC20429 for ; Thu, 19 Nov 2015 02:42:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D100D6E892; Wed, 18 Nov 2015 18:42:31 -0800 (PST) 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 [178.209.48.109]) by gabe.freedesktop.org (Postfix) with ESMTPS id 229BF6E892 for ; Wed, 18 Nov 2015 18:42:29 -0800 (PST) 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 E201A5C15BA; Thu, 19 Nov 2015 03:42:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=agner.ch; s=dkim; t=1447900931; bh=IqD1FqAJggM0sd+Zbf9f93Otw0My/9ayrs7itQaypXI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZTroYrlCA3nty93kHYqCrhIIgfAFPqaITT5Bp3e8/+bhpFbHeBBYaWz0OYJ7V/cEW ki3HCX0PCaaed0G4YvnQ2i7R8h7ll7BHfasxzd4J/omAWUj/8YlKjBujumpSvsniuN nDQjQN73KPcbrH3uupWJsMechmoAWh3x9EirKmwQ= From: Stefan Agner To: airlied@linux.ie, daniel.vetter@ffwll.ch, jianwei.wang.chn@gmail.com Subject: [PATCH 7/7] drm/fsl-dcu: use mode flags for hsync/vsync pixelclk polarity Date: Wed, 18 Nov 2015 18:42:50 -0800 Message-Id: <1447900970-15936-8-git-send-email-stefan@agner.ch> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1447900970-15936-1-git-send-email-stefan@agner.ch> References: <1447900970-15936-1-git-send-email-stefan@agner.ch> Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, alison.wang@freescale.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=-4.6 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 The current default configuration is as follows: - Display samples data on the falling edge - Invert VSYNC signal (active LOW) - Invert HSYNC signal (active LOW) The mode flags allow to specify the required polarity per display. Furthermore, none of the current driver settings is actually a standard polarity. This patch applies the current driver standard polarities as explicit flags to the display which has been introduced with the driver (NEC WQVGA "nec,nl4827hc19-05b"). The driver now also parses the flags field and applies the configuration accordingly, by using the following values as defaults (e.g. if no flags are specified): - Display samples data on the rising edge - VSYNC signal not inverted (active HIGH) - HSYNC signal not inverted (active HIGH) Signed-off-by: Stefan Agner --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 16 +++++++++++++--- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.h | 4 ++-- drivers/gpu/drm/panel/panel-simple.c | 2 ++ 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c index b2f56e4..db69725 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c @@ -18,6 +18,8 @@ #include #include +#include