drm/imx: ipuv3-plane: use drm managed resources
authorPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 10 Dec 2020 15:38:44 +0000 (16:38 +0100)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Mon, 4 Jan 2021 11:59:34 +0000 (12:59 +0100)
commit699e7e543f1a7cc5a28159832e9a28261bc9e6be
treecb27d492403bc7d94a1986181060fb25eeda76c3
parentc0ad88a9d8e53d63859e5b692b319c1a1a173917
drm/imx: ipuv3-plane: use drm managed resources

Use drmm_universal_plane_alloc() to align plane memory lifetime with
the drm device. drm_plane_cleanup() is called automatically before the
memory is freed.
Also move the call to ipu_plane_get_resources() into ipu_plane_init()
and use drm managed resources to put IPU resources automatically when
required. Handle error return values of the plane property creation
functions.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/imx/ipuv3-crtc.c
drivers/gpu/drm/imx/ipuv3-plane.c
drivers/gpu/drm/imx/ipuv3-plane.h