diff options
| author | Douglas Anderson <[email protected]> | 2023-09-21 19:26:52 +0000 |
|---|---|---|
| committer | Inki Dae <[email protected]> | 2023-12-12 04:06:34 +0000 |
| commit | 16ac5b21b31b439f03cdf44c153c5f5af94fb3eb (patch) | |
| tree | 3bdf4351b739afe9627a75ae59f4c154f2557f7a /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
| parent | Merge tag 'exynos-drm-next-for-v6.7-rc5' of git://git.kernel.org/pub/scm/linu... (diff) | |
| download | kernel-16ac5b21b31b439f03cdf44c153c5f5af94fb3eb.tar.gz kernel-16ac5b21b31b439f03cdf44c153c5f5af94fb3eb.zip | |
drm/exynos: 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 <[email protected]>
Reviewed-by: Maxime Ripard <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
Tested-by: Marek Szyprowski <[email protected]>
Reviewed-by: Marek Szyprowski <[email protected]>
Signed-off-by: Inki Dae <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
0 files changed, 0 insertions, 0 deletions
