From patchwork Thu Dec 12 08:35:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 300581 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from casper.infradead.org (unknown [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EF7652C00AB for ; Thu, 12 Dec 2013 19:36:24 +1100 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vr1kl-0001E7-Lp; Thu, 12 Dec 2013 08:36:15 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vr1ki-0005Uj-Vw; Thu, 12 Dec 2013 08:36:13 +0000 Received: from mail.karo-electronics.de ([81.173.242.67]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vr1ke-0005So-NE for linux-arm-kernel@lists.infradead.org; Thu, 12 Dec 2013 08:36:10 +0000 From: =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= To: linux-fbdev@vger.kernel.org Subject: [PATCH] video: mxsfb: fix broken video mode selection Date: Thu, 12 Dec 2013 09:35:24 +0100 Message-Id: <1386837324-6288-1-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 1.7.2.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131212_033609_057336_B3AB7B50 X-CRM114-Status: GOOD ( 19.64 ) X-Spam-Score: -2.8 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [81.173.242.67 listed in list.dnswl.org] -0.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Tomi Valkeinen , Jean-Christophe Plagniol-Villard , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org currently the driver re-implements the code found in of_get_videomode() except for the fact that the latter honors the 'native-mode' property to select a spcific video timing from the list of possible timings. The driver builds up a list of all video timings, but uses only the last mode from the list anyway. While building the list it incorrectly OR's the 'pixelclk-active' and 'de-active' flags of all modes into single flags, possibly leading to a wrong pixelclock or data-enable polarity setting. Fix this by using the of_get_videomode() directly with the OF_USE_NATIVE_MODE flag. Since all current dts files only have one entry in their display-timings node, this bug was not apparent and the fix does not change the driver's behaviour for the current users. Signed-off-by: Lothar Waßmann --- drivers/video/mxsfb.c | 126 ++++++++++++++++++++---------------------------- 1 files changed, 53 insertions(+), 73 deletions(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 27197a8..accf48a2 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -49,6 +49,7 @@ #include #include #include