diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/4729-drm-amdgpu-Get-real-power-source-to-initizlize-ac_po.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/4729-drm-amdgpu-Get-real-power-source-to-initizlize-ac_po.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/4729-drm-amdgpu-Get-real-power-source-to-initizlize-ac_po.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/4729-drm-amdgpu-Get-real-power-source-to-initizlize-ac_po.patch new file mode 100644 index 00000000..428e8cf8 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/4729-drm-amdgpu-Get-real-power-source-to-initizlize-ac_po.patch @@ -0,0 +1,40 @@ +From 7bac726cbf64d5dcea4cb03d9fbe161c30766abb Mon Sep 17 00:00:00 2001 +From: Rex Zhu <Rex.Zhu@amd.com> +Date: Mon, 4 Jun 2018 18:26:18 +0800 +Subject: [PATCH 4729/5725] 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. + +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> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +index 3d23d8b..a847b42 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +@@ -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> +@@ -2350,6 +2351,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) { +-- +2.7.4 + |