From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751926Ab3LLIfd (ORCPT ); Thu, 12 Dec 2013 03:35:33 -0500 Received: from mail.karo-electronics.de ([81.173.242.67]:59742 "EHLO mail.karo-electronics.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751382Ab3LLIfa (ORCPT ); Thu, 12 Dec 2013 03:35:30 -0500 From: =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= To: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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