aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrike Liang <[email protected]>2023-11-08 06:38:29 +0000
committerAlex Deucher <[email protected]>2023-11-29 21:49:00 +0000
commit0e6a12884ca72520b195d95f1fa1bf790678cd6c (patch)
tree0ce437302d6ae3e2f684c917e0ff0e5f47438900
parentRevert "drm/amd/display: Enable CM low mem power optimization" (diff)
downloadkernel-0e6a12884ca72520b195d95f1fa1bf790678cd6c.tar.gz
kernel-0e6a12884ca72520b195d95f1fa1bf790678cd6c.zip
drm/amdgpu: correct the amdgpu runtime dereference usage count
Fix the amdgpu runpm dereference usage count. Signed-off-by: Prike Liang <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_display.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 0cacd0b9f8be..b8fbe97efe1d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -340,14 +340,11 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
adev->have_disp_power_ref = true;
return ret;
}
- /* if we have no active crtcs, then drop the power ref
- * we got before
+ /* if we have no active crtcs, then go to
+ * drop the power ref we got before
*/
- if (!active && adev->have_disp_power_ref) {
- pm_runtime_put_autosuspend(dev->dev);
+ if (!active && adev->have_disp_power_ref)
adev->have_disp_power_ref = false;
- }
-
out:
/* drop the power reference we got coming in here */
pm_runtime_put_autosuspend(dev->dev);