From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sam Ravnborg Date: Sat, 25 Aug 2018 18:23:20 +0000 Subject: [PATCH v2 1/1] atmel_lcdfb: support native-mode display-timings Message-Id: <20180825182320.GA3285@ravnborg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Bartlomiej Zolnierkiewicz , Nicolas Ferre , Alexandre Belloni Cc: linux-fbdev@vger.kernel.org, Sam Ravnborg , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org 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: Bartlomiej Zolnierkiewicz Cc: Alexandre Belloni --- v1 =3D> v2 Rebased on top of v4.18, resend 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 076d24afbd72..4ed55e6bbb84 100644 --- a/drivers/video/fbdev/atmel_lcdfb.c +++ b/drivers/video/fbdev/atmel_lcdfb.c @@ -22,6 +22,7 @@ #include #include #include +#include