Commit c6df7f31 authored by Prike Liang's avatar Prike Liang Committed by Alex Deucher

drm/amdgpu: correct the amdgpu runtime dereference usage count

Fix the amdgpu runpm dereference usage count.
Signed-off-by: default avatarPrike Liang <Prike.Liang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent 4636a211
...@@ -340,14 +340,11 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set, ...@@ -340,14 +340,11 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
adev->have_disp_power_ref = true; adev->have_disp_power_ref = true;
return ret; return ret;
} }
/* if we have no active crtcs, then drop the power ref /* if we have no active crtcs, then go to
* we got before * drop the power ref we got before
*/ */
if (!active && adev->have_disp_power_ref) { if (!active && adev->have_disp_power_ref)
pm_runtime_put_autosuspend(dev->dev);
adev->have_disp_power_ref = false; adev->have_disp_power_ref = false;
}
out: out:
/* drop the power reference we got coming in here */ /* drop the power reference we got coming in here */
pm_runtime_put_autosuspend(dev->dev); pm_runtime_put_autosuspend(dev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment