From: LW@KARO-electronics.de (=?UTF-8?q?Lothar=20Wa=C3=9Fmann?=) Date: Mon, 6 Jan 2014 14:17:58 +0100 Subject: [PATCH 2/2] video: mxsfb: fix broken videomode selection In-Reply-To: <1389014278-4903-1-git-send-email-LW@KARO-electronics.de> References: <1389014278-4903-1-git-send-email-LW@KARO-electronics.de> Message-ID: <1389014278-4903-3-git-send-email-LW@KARO-electronics.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.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 | 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