From patchwork Mon Jan 6 13:17:58 2014 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: 3438071 Return-Path: X-Original-To: patchwork-linux-fbdev@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 110119F1C4 for ; Mon, 6 Jan 2014 13:26:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 89B29200E1 for ; Mon, 6 Jan 2014 13:26:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BEC7D200E6 for ; Mon, 6 Jan 2014 13:26:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751482AbaAFN00 (ORCPT ); Mon, 6 Jan 2014 08:26:26 -0500 Received: from mail.karo-electronics.de ([81.173.242.67]:64173 "EHLO mail.karo-electronics.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751095AbaAFN0P (ORCPT ); Mon, 6 Jan 2014 08:26:15 -0500 From: =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= To: linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Jean-Christophe Plagniol-Villard , Tomi Valkeinen , Fabio Estevam , Shawn Guo , =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= Subject: [PATCH 2/2] video: mxsfb: fix broken videomode selection Date: Mon, 6 Jan 2014 14:17:58 +0100 Message-Id: <1389014278-4903-3-git-send-email-LW@KARO-electronics.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1389014278-4903-1-git-send-email-LW@KARO-electronics.de> References: <1389014278-4903-1-git-send-email-LW@KARO-electronics.de> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 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 | 120 ++++++++++++++++++++---------------------------- 1 files changed, 50 insertions(+), 70 deletions(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index d11c35c..accf48a2 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -49,6 +49,7 @@ #include #include #include