drm/ingenic: Call drm_atomic_helper_shutdown() at shutdown time
authorDouglas Anderson <dianders@chromium.org>
Fri, 1 Sep 2023 23:41:14 +0000 (16:41 -0700)
committerDouglas Anderson <dianders@chromium.org>
Wed, 13 Sep 2023 18:12:20 +0000 (11:12 -0700)
commitc3ca98396ffabcea6573bce872d2f8d494c3f7b4
tree8ad8cfc83d53ded0549de0c4f8db5b1cd0b6a448
parent02680d71dea89b3e58015cf726f5e175730e1002
drm/ingenic: Call drm_atomic_helper_shutdown() at shutdown time

Based on grepping through the source code this driver appears to be
missing a call to drm_atomic_helper_shutdown() at system shutdown
time. Among other things, this means that if a panel is in use that it
won't be cleanly powered off at system shutdown time.

The fact that we should call drm_atomic_helper_shutdown() in the case
of OS shutdown/restart comes straight out of the kernel doc "driver
instance overview" in drm_drv.c.

Since this driver uses the component model and shutdown happens at the
base driver, we communicate whether we have to call
drm_atomic_helper_shutdown() by seeing if drvdata is non-NULL.

Suggested-by: Maxime Ripard <mripard@kernel.org>
Acked-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230901164111.RFT.3.Iea742f06d8bec41598aa40378fc625fbd7e8a3d6@changeid
drivers/gpu/drm/ingenic/ingenic-drm-drv.c