drm/amdgpu: Remove duplicated power source update
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0 -8
@@ -1933,14 +1933,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);
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1535006303-11339-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Quoted 4 lines · Rex Zhu
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.
Don't we need this to get the initial state? Maybe we should move this to one of the init functions if we don't already check there.
Alex
Quoted 28 lines
Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 -------- 1 file changed, 8 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0
-9@@ -1933,14 +1933,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); --1.9.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): CADnq5_PSD=jQJcudfmshYHQyRNW6jWKsSqzN4jq7J7823otjzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi Alex,
We get initial state in amdgpu_device_init.
Best Regards
Rex
Quoted 25 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, August 23, 2018 8:37 PM
To: Zhu, Rex <[email protected]>
Cc: amd-gfx list <[email protected]>; Wu, Hersen <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Remove duplicated power source updateQuoted 4 lines · Rex Zhu
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.
Don't we need this to get the initial state? Maybe we should move this to one of the init functions if we don't already check there.
Alex
Quoted 6 lines
Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 -------- 1 file changed, 8 deletions(-)
Quoted 28 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c void amdgpu_pm_compute_clocks(struct
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0
-0@@ -1933,14 +1933,6 @@ void amdgpu_pm_compute_clocks(struct
amdgpu_device*adev)Quoted 21 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0
-9amdgpu_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); --1.9.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BYAPR12MB2775DA189D7393E5400E3A1DFB370-ZGDeBxoHBPmJeBUhB162ZQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Deucher, Alexander
Reviewed-byIn that case,
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Zhu, Rex <[email protected]>
Sent: Thursday, August 23, 2018 8:41:28 AM
To: Alex Deucher
Cc: Wu, Hersen; amd-gfx list
Subject: RE: [PATCH] drm/amdgpu: Remove duplicated power source update
Hi Alex,
We get initial state in amdgpu_device_init.
Best Regards
Rex
Quoted 25 lines
-----Original Message-----
From: Alex Deucher <[email protected]>
Sent: Thursday, August 23, 2018 8:37 PM
To: Zhu, Rex <[email protected]>
Cc: amd-gfx list <[email protected]>; Wu, Hersen <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Remove duplicated power source updateQuoted 4 lines · Rex Zhu
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.
Don't we need this to get the initial state? Maybe we should move this to one of the init functions if we don't already check there.
Alex
Quoted 6 lines
Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 -------- 1 file changed, 8 deletions(-)
Quoted 28 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c void amdgpu_pm_compute_clocks(struct
Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0
-0@@ -1933,14 +1933,6 @@ void amdgpu_pm_compute_clocks(struct
amdgpu_device*adev)Quoted 21 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0
-9amdgpu_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); --1.9.1
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx