aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2018-08-23 11:46:13 +0800
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2018-09-03 15:21:39 +0530
commitd5dde5627bd939226a05599ec90ba61183112715 (patch)
tree980ffb8099c63dcb4da169fb0d584bb59f856291
parentabb207f425deae0cf29fa4e94bcb21762cbc97cc (diff)
download96b-common-d5dde5627bd939226a05599ec90ba61183112715.tar.gz
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>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c8
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 8f98629fbe59..7b4e657a95c7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -1932,14 +1932,6 @@ void amdgpu_pm_compute_clocks(struct amdgpu_device *adev)
amdgpu_fence_wait_empty(ring);
}
- mutex_lock(&adev->pm.mutex);
- /* update battery/ac status */
- if (power_supply_is_system_supplied() > 0)
- adev->pm.ac_power = true;
- else
- adev->pm.ac_power = false;
- mutex_unlock(&adev->pm.mutex);
-
if (adev->powerplay.pp_funcs->dispatch_tasks) {
if (!amdgpu_device_has_dc_support(adev)) {
mutex_lock(&adev->pm.mutex);