OSDN Git Service

atmel_lcdfb: support native-mode display-timings
authorSam Ravnborg <sam@ravnborg.org>
Mon, 8 Oct 2018 10:57:35 +0000 (12:57 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 8 Oct 2018 10:57:35 +0000 (12:57 +0200)
commit60e5e48dba72c6b59a7a9c7686ba320766913368
treeec1e4a21924301eae17c3b015e2978a4758700d9
parent811ab8db890714e6644dae09366ef2820ca11272
atmel_lcdfb: support native-mode display-timings

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 <sam@ravnborg.org>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/atmel_lcdfb.c