drm: rcar-du: Use drmm_encoder_alloc() to manage encoder
authorKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Wed, 13 Jan 2021 17:02:53 +0000 (17:02 +0000)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 16 Mar 2021 01:12:36 +0000 (03:12 +0200)
commit7a1adbd2399023177508836c2b13a6c723035409
tree0944e198406337c190113206796643db7d1db21e
parent4042160c2e5433e0759782c402292a90b5bf458d
drm: rcar-du: Use drmm_encoder_alloc() to manage encoder

The encoder allocation was converted to a DRM managed resource at the
same time as the addition of a new helper drmm_encoder_alloc() which
simplifies the same process.

Convert the custom drm managed resource allocation of the encoder
with the helper to simplify the implementation, and prevent hitting a
WARN_ON() due to the handling the drm_encoder_init() call directly
without registering a .destroy() function op.

Fixes: f5f16725edbc ("drm: rcar-du: Use DRM-managed allocation for encoders")
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_encoder.c