From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Date: Wed, 13 Nov 2019 01:49:16 +0000 Subject: [PATCH AUTOSEL 4.19 140/209] atmel_lcdfb: support native-mode display-timings Message-Id: <20191113015025.9685-140-sashal@kernel.org> List-Id: References: <20191113015025.9685-1-sashal@kernel.org> In-Reply-To: <20191113015025.9685-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sam Ravnborg , Nicolas Ferre , Alexandre Belloni , Bartlomiej Zolnierkiewicz , Sasha Levin , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org From: Sam Ravnborg [ Upstream commit 60e5e48dba72c6b59a7a9c7686ba320766913368 ] When a device tree set a display-timing using native-mode then according to the bindings doc this should: native-mode: The native mode for the display, in case multiple modes are provided. When omitted, assume the first node is the native. The atmel_lcdfb used the last timing subnode and did not respect the timing mode specified with native-mode. Introduce use of of_get_videomode() which allowed a nice simplification of the code while also added support for native-mode. As a nice side-effect this fixes a memory leak where the data used for timings and the display_np was not freed. Signed-off-by: Sam Ravnborg Cc: Nicolas Ferre Cc: Alexandre Belloni Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Sasha Levin --- drivers/video/fbdev/atmel_lcdfb.c | 43 +++++++------------------------ 1 file changed, 9 insertions(+), 34 deletions(-) diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_= lcdfb.c index 076d24afbd728..4ed55e6bbb840 100644 --- a/drivers/video/fbdev/atmel_lcdfb.c +++ b/drivers/video/fbdev/atmel_lcdfb.c @@ -22,6 +22,7 @@ #include #include #include +#include