linux-stable/drivers/gpu/drm/ingenic
Paul Cercueil e488b1023a
drm/ingenic: Register devm action to cleanup encoders
Since the encoders have been devm-allocated, they will be freed way
before drm_mode_config_cleanup() is called. To avoid use-after-free
conditions, we then must ensure that drm_encoder_cleanup() is called
before the encoders are freed.

v2: Use the new __drmm_simple_encoder_alloc() function

v3: Use the new drmm_plain_simple_encoder_alloc() macro

v4: Use drmm_plain_encoder_alloc() macro

Fixes: c369cb27c2 ("drm/ingenic: Support multiple panels/bridges")
Cc: <stable@vger.kernel.org> # 5.8+
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210327115742.18986-4-paul@crapouillou.net
2021-03-29 16:47:12 +01:00
..
ingenic-drm-drv.c drm/ingenic: Register devm action to cleanup encoders 2021-03-29 16:47:12 +01:00
ingenic-drm.h drm/ingenic: Add support for serial 8-bit delta-RGB panels 2020-12-08 13:56:00 +00:00
ingenic-ipu.c drm: Use state helper instead of the plane state pointer 2021-02-25 08:05:28 +01:00
ingenic-ipu.h drm/ingenic: Add support for the IPU 2020-07-17 00:46:17 +02:00
Kconfig drm/ingenic: depend on COMMON_CLK to fix compile tests 2020-12-04 10:05:25 +00:00
Makefile drm/ingenic: Add support for the IPU 2020-07-17 00:46:17 +02:00