aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPrike Liang <Prike.Liang@amd.com>2023-11-08 14:38:29 +0800
committerAlex Deucher <alexander.deucher@amd.com>2023-11-29 18:04:55 -0500
commitc6df7f313794c3ad41a49b9a7c95da369db607f3 (patch)
tree0a7f161b29a1b89097ce5e429cd211e912a691f1
parent4636a211980052ca0df90265c8a3ed2d46099091 (diff)
downloadlinux-xfs-c6df7f313794c3ad41a49b9a7c95da369db607f3.tar.gz
drm/amdgpu: correct the amdgpu runtime dereference usage count
Fix the amdgpu runpm dereference usage count. Signed-off-by: Prike Liang <Prike.Liang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-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 0cacd0b9f8bead..b8fbe97efe1d3c 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);