diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-08-22 23:46:13 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-08-27 16:10:55 -0400 |
commit | d3200a536ccbc047cee408c44a92235c4e84c91b (patch) | |
tree | 06f1f6cd1152dc0429b5ed38103386892837afa0 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
parent | 1f06dee8f784e4f3af4add95076659ba95ffa9fb (diff) |
drm/amdgpu: Remove duplicated power source update
when ac/dc switch, driver will be notified by acpi event.
then the power source will be updated. so don't need to
get power source when set power state.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index daa55fb06171..3e51e9c89f04 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -1933,14 +1933,6 @@ void amdgpu_pm_compute_clocks(struct amdgpu_device *adev) | |||
1933 | amdgpu_fence_wait_empty(ring); | 1933 | amdgpu_fence_wait_empty(ring); |
1934 | } | 1934 | } |
1935 | 1935 | ||
1936 | mutex_lock(&adev->pm.mutex); | ||
1937 | /* update battery/ac status */ | ||
1938 | if (power_supply_is_system_supplied() > 0) | ||
1939 | adev->pm.ac_power = true; | ||
1940 | else | ||
1941 | adev->pm.ac_power = false; | ||
1942 | mutex_unlock(&adev->pm.mutex); | ||
1943 | |||
1944 | if (adev->powerplay.pp_funcs->dispatch_tasks) { | 1936 | if (adev->powerplay.pp_funcs->dispatch_tasks) { |
1945 | if (!amdgpu_device_has_dc_support(adev)) { | 1937 | if (!amdgpu_device_has_dc_support(adev)) { |
1946 | mutex_lock(&adev->pm.mutex); | 1938 | mutex_lock(&adev->pm.mutex); |