drm/amdgpu: Get real power source to initizlize ac_power
Subsystems (2)
PATCH 1/1 drm/amdgpu: Get real power source to initizlize ac_power
driver need to know the real power source to do some power related configuration when initialize.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
@@ -25,6 +25,7 @@* Alex Deucher * Jerome Glisse */ +#include <linux/power_supply.h> #include <linux/kthread.h> #include <linux/console.h> #include <linux/slab.h>
@@ -2281,6 +2282,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,INIT_DELAYED_WORK (&adev->late_init_work, amdgpu_device_ip_late_init_func_handler); + adev->pm.ac_power =power_supply_is_system_supplied () >0 ? true : false; +/* Registers mapping */ /* TODO: block userspace mapping of io register */ if (adev->asic_type >=CHIP_BONAIRE ) {
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): 1528108334-24757-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Deucher, Alexander
Reviewed-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Rex Zhu <[email protected]>
Sent: Monday, June 4, 2018 6:32:14 AM
To: [email protected]
Cc: Zhu, Rex
Subject: [PATCH] drm/amdgpu: Get real power source to initizlize ac_power
driver need to know the real power source to do some power related configuration when initialize.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
@@ -25,6 +25,7 @@* Alex Deucher * Jerome Glisse */ +#include <linux/power_supply.h> #include <linux/kthread.h> #include <linux/console.h> #include <linux/slab.h>
@@ -2281,6 +2282,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,INIT_DELAYED_WORK (&adev->late_init_work, amdgpu_device_ip_late_init_func_handler); + adev->pm.ac_power =power_supply_is_system_supplied () >0 ? true : false; +/* Registers mapping */ /* TODO: block userspace mapping of io register */ if (adev->asic_type >=CHIP_BONAIRE ) {
--
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