drm/fsl-dcu: fix opencoded use of drm_panel_*
authorSam Ravnborg <sam@ravnborg.org>
Sun, 4 Aug 2019 20:16:26 +0000 (22:16 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Sat, 10 Aug 2019 13:41:48 +0000 (15:41 +0200)
commit24bc3e9ce68a41c73b32af8cd077fdf26b31516c
treee4146840c9ba185c4589f173a5aa5f23780ef250
parent90fbc5105653c1c757eb5889b32106cdd754e69f
drm/fsl-dcu: fix opencoded use of drm_panel_*

Use drm_panel_get_modes() to access modes.
This has a nice side effect to simplify the code.

drm_panel_get_modes() may return a negative value if
for example panel is NULL. This is a small change
compared to before, but really what we want.

v2:
- Add more info to changelog (Stefan)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Stefan Agner <stefan@agner.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Cc: Alison Wang <alison.wang@nxp.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190804201637.1240-6-sam@ravnborg.org
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c