diff options
author | Douglas Anderson <dianders@chromium.org> | 2023-09-02 02:41:24 +0300 |
---|---|---|
committer | Douglas Anderson <dianders@chromium.org> | 2023-09-13 18:36:19 +0300 |
commit | 02680d71dea89b3e58015cf726f5e175730e1002 (patch) | |
tree | fb847d44676837f29d901d2c9dcddefb25d5aef1 /drivers/gpu/drm/ingenic | |
parent | 2a073968289d3e60d9262a12d5dec71725787b2d (diff) | |
download | linux-02680d71dea89b3e58015cf726f5e175730e1002.tar.xz |
drm/imx/ipuv3: Call drm_atomic_helper_shutdown() at shutdown/unbind 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
and at driver unbind 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 and at driver remove (or unbind) time comes
straight out of the kernel doc "driver instance overview" in
drm_drv.c.
A few notes about this fix:
- When adding drm_atomic_helper_shutdown() to the unbind path, I added
it after drm_kms_helper_poll_fini() since that's when other drivers
seemed to have it.
- Technically with a previous patch, ("drm/atomic-helper:
drm_atomic_helper_shutdown(NULL) should be a noop"), we don't
actually need to check to see if our "drm" pointer is NULL before
calling drm_atomic_helper_shutdown(). We'll leave the "if" test in,
though, so that this patch can land without any dependencies. It
could potentially be removed later.
- This patch also makes sure to set the drvdata to NULL in the case of
bind errors to make sure that shutdown can't access freed data.
Suggested-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230901164111.RFT.13.I0a9940ff6f387d6acf4e71d8c7dbaff8c42e3aaa@changeid
Diffstat (limited to 'drivers/gpu/drm/ingenic')
0 files changed, 0 insertions, 0 deletions