diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2024-07-26 11:42:40 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-10-07 14:02:05 -0400 |
commit | b0fca3275526db94e64106fa86473bb3a8ea795f (patch) | |
tree | 53101912bf7bbbcd70b421f3d1687722e2d3cfa4 /drivers/gpu | |
parent | e15ec812b52951e9816ae2d47361fe6b82a8ba3b (diff) |
drm/amd/pm: fix rpm refcount handling on error
pm_runtime_put_autosuspend must be called from all exit paths.
Tested-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index d5d6ab484e5a..485672f3d6c5 100644 --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c @@ -1815,6 +1815,8 @@ static ssize_t amdgpu_set_apu_thermal_cap(struct device *dev, ret = amdgpu_dpm_set_apu_thermal_limit(adev, value); if (ret) { + pm_runtime_mark_last_busy(ddev->dev); + pm_runtime_put_autosuspend(ddev->dev); dev_err(dev, "failed to update thermal limit\n"); return ret; } |