aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3134-drm-amdgpu-add-reset_method-asic-callback-for-navi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3134-drm-amdgpu-add-reset_method-asic-callback-for-navi.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3134-drm-amdgpu-add-reset_method-asic-callback-for-navi.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3134-drm-amdgpu-add-reset_method-asic-callback-for-navi.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3134-drm-amdgpu-add-reset_method-asic-callback-for-navi.patch
new file mode 100644
index 00000000..168e4e7b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3134-drm-amdgpu-add-reset_method-asic-callback-for-navi.patch
@@ -0,0 +1,57 @@
+From 548f69228fd63749d71e15301f697fca3c969a3e Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue, 23 Jul 2019 23:48:21 -0500
+Subject: [PATCH 3134/4256] drm/amdgpu: add reset_method asic callback for navi
+
+Navi uses either mode1 or baco depending on various
+conditions.
+
+Reviewed-by: Evan Quan <evan.quan@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/nv.c | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
+index 6c59b64b9bb1..bf4cbcdeef78 100644
+--- a/drivers/gpu/drm/amd/amdgpu/nv.c
++++ b/drivers/gpu/drm/amd/amdgpu/nv.c
+@@ -289,6 +289,18 @@ static int nv_asic_mode1_reset(struct amdgpu_device *adev)
+
+ return ret;
+ }
++
++static enum amd_reset_method
++nv_asic_reset_method(struct amdgpu_device *adev)
++{
++ struct smu_context *smu = &adev->smu;
++
++ if (smu_baco_is_support(smu))
++ return AMD_RESET_METHOD_BACO;
++ else
++ return AMD_RESET_METHOD_MODE1;
++}
++
+ static int nv_asic_reset(struct amdgpu_device *adev)
+ {
+
+@@ -303,7 +315,7 @@ static int nv_asic_reset(struct amdgpu_device *adev)
+ int ret = 0;
+ struct smu_context *smu = &adev->smu;
+
+- if (smu_baco_is_support(smu))
++ if (nv_asic_reset_method(adev) == AMD_RESET_METHOD_BACO)
+ ret = smu_baco_reset(smu);
+ else
+ ret = nv_asic_mode1_reset(adev);
+@@ -500,6 +512,7 @@ static const struct amdgpu_asic_funcs nv_asic_funcs =
+ .read_bios_from_rom = &nv_read_bios_from_rom,
+ .read_register = &nv_read_register,
+ .reset = &nv_asic_reset,
++ .reset_method = &nv_asic_reset_method,
+ .set_vga_state = &nv_vga_set_state,
+ .get_xclk = &nv_get_xclk,
+ .set_uvd_clocks = &nv_set_uvd_clocks,
+--
+2.17.1
+