aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4538-drm-amdgpu-add-asic-callback-for-BACO-support.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4538-drm-amdgpu-add-asic-callback-for-BACO-support.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4538-drm-amdgpu-add-asic-callback-for-BACO-support.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4538-drm-amdgpu-add-asic-callback-for-BACO-support.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4538-drm-amdgpu-add-asic-callback-for-BACO-support.patch
new file mode 100644
index 00000000..701103e5
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4538-drm-amdgpu-add-asic-callback-for-BACO-support.patch
@@ -0,0 +1,41 @@
+From ac82736a44cd284962cf06b49c16c3f27746f3fd Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Fri, 4 Oct 2019 10:01:35 -0500
+Subject: [PATCH 4538/4736] drm/amdgpu: add asic callback for BACO support
+
+BACO - Bus Active, Chip Off
+
+Used to check whether the device supports BACO. This will
+be used to enable runtime pm on devices which support BACO.
+
+Reviewed-by: Evan Quan <evan.quan@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+index 9915f0472611..0e736a65d5dc 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+@@ -599,6 +599,8 @@ struct amdgpu_asic_funcs {
+ bool (*need_reset_on_init)(struct amdgpu_device *adev);
+ /* PCIe replay counter */
+ uint64_t (*get_pcie_replay_count)(struct amdgpu_device *adev);
++ /* device supports BACO */
++ bool (*supports_baco)(struct amdgpu_device *adev);
+ };
+
+ /*
+@@ -1168,6 +1170,8 @@ int emu_soc_asic_init(struct amdgpu_device *adev);
+ #define amdgpu_asic_get_pcie_usage(adev, cnt0, cnt1) ((adev)->asic_funcs->get_pcie_usage((adev), (cnt0), (cnt1)))
+ #define amdgpu_asic_need_reset_on_init(adev) (adev)->asic_funcs->need_reset_on_init((adev))
+ #define amdgpu_asic_get_pcie_replay_count(adev) ((adev)->asic_funcs->get_pcie_replay_count((adev)))
++#define amdgpu_asic_supports_baco(adev) (adev)->asic_funcs->supports_baco((adev))
++
+ #define amdgpu_inc_vram_lost(adev) atomic_inc(&((adev)->vram_lost_counter));
+
+ /* Common functions */
+--
+2.17.1
+