drm/omap: add sanity plane state check
authorNeil Armstrong <narmstrong@baylibre.com>
Wed, 17 Nov 2021 14:19:20 +0000 (15:19 +0100)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 8 Dec 2021 08:04:33 +0000 (10:04 +0200)
commitc21134b042ef9eb1662fd856941f031eb76d77b1
tree3c6fb440637e658d036c6cd5dd7023b414e7fffc
parentfe4d0b6317e35a9a371d1107c9b753becc81e968
drm/omap: add sanity plane state check

Call drm_atomic_helper_check_plane_state() from the plane
atomic_check() callback in order to add plane state sanity
checking.

It will permit filtering out totally bad scaling factors, even
if the real check are done later in the atomic commit.

Calling drm_atomic_helper_check_plane_state() also sets
plane_state->visible which will be useful when dynamically
assigning hw overlays to planes.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211117141928.771082-2-narmstrong@baylibre.com
drivers/gpu/drm/omapdrm/omap_plane.c