aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4543-drm-amdgpu-add-supports_baco-callback-for-NV-asics.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4543-drm-amdgpu-add-supports_baco-callback-for-NV-asics.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4543-drm-amdgpu-add-supports_baco-callback-for-NV-asics.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4543-drm-amdgpu-add-supports_baco-callback-for-NV-asics.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4543-drm-amdgpu-add-supports_baco-callback-for-NV-asics.patch
new file mode 100644
index 00000000..b101211d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4543-drm-amdgpu-add-supports_baco-callback-for-NV-asics.patch
@@ -0,0 +1,48 @@
+From 670826463241f5b9990f453e52dc9c321a228b4b Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Thu, 7 Nov 2019 18:12:17 -0500
+Subject: [PATCH 4543/4736] drm/amdgpu: add supports_baco callback for NV
+ asics.
+
+BACO - Bus Active, Chip Off
+
+Check the BACO capabilities from the powerplay table.
+
+Reviewed-by: Evan Quan <evan.quan@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/nv.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
+index 4a52e5d59807..5cdd6528f011 100644
+--- a/drivers/gpu/drm/amd/amdgpu/nv.c
++++ b/drivers/gpu/drm/amd/amdgpu/nv.c
+@@ -314,6 +314,16 @@ static int nv_asic_mode1_reset(struct amdgpu_device *adev)
+ return ret;
+ }
+
++static bool nv_asic_supports_baco(struct amdgpu_device *adev)
++{
++ struct smu_context *smu = &adev->smu;
++
++ if (smu_baco_is_support(smu))
++ return true;
++ else
++ return false;
++}
++
+ static enum amd_reset_method
+ nv_asic_reset_method(struct amdgpu_device *adev)
+ {
+@@ -619,6 +629,7 @@ static const struct amdgpu_asic_funcs nv_asic_funcs =
+ .get_pcie_usage = &nv_get_pcie_usage,
+ .need_reset_on_init = &nv_need_reset_on_init,
+ .get_pcie_replay_count = &nv_get_pcie_replay_count,
++ .supports_baco = &nv_asic_supports_baco,
+ };
+
+ static int nv_common_early_init(void *handle)
+--
+2.17.1
+