aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2222-drm-amdgpu-fix-rmmod-KCQ-disable-failed-error.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2222-drm-amdgpu-fix-rmmod-KCQ-disable-failed-error.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2222-drm-amdgpu-fix-rmmod-KCQ-disable-failed-error.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2222-drm-amdgpu-fix-rmmod-KCQ-disable-failed-error.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2222-drm-amdgpu-fix-rmmod-KCQ-disable-failed-error.patch
new file mode 100644
index 00000000..42d76968
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2222-drm-amdgpu-fix-rmmod-KCQ-disable-failed-error.patch
@@ -0,0 +1,63 @@
+From 5c22e54773ab249d664a90f94ad17913a22a8e86 Mon Sep 17 00:00:00 2001
+From: Wang Hongcheng <Annie.Wang@amd.com>
+Date: Fri, 17 Nov 2017 10:39:02 +0800
+Subject: [PATCH 2222/4131] drm/amdgpu: fix rmmod KCQ disable failed error
+
+If gfx_v8_0_hw_fini is called after amdgpu_ucode_fini_bo, we will
+hit KCQ disabled failed. Let amdgpu_ucode_fini_bo run after
+gfx_v8_0_hw_fini.
+
+BUG: SWDEV-135547
+Change-Id: I4e917d9d0c02e6e306152d345dfc321db83ae63c
+Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
+Signed-off-by: Wang Hongcheng <Annie.Wang@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
+ drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 3 ---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 --
+ 3 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+index ddb2716..9af0e92 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+@@ -1867,6 +1867,9 @@ static int amdgpu_fini(struct amdgpu_device *adev)
+ adev->ip_blocks[i].status.hw = false;
+ }
+
++ if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
++ amdgpu_ucode_fini_bo(adev);
++
+ for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
+ if (!adev->ip_blocks[i].status.sw)
+ continue;
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
+index 5f5aa5f..033fba2 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
+@@ -164,9 +164,6 @@ static int amdgpu_pp_hw_fini(void *handle)
+ ret = adev->powerplay.ip_funcs->hw_fini(
+ adev->powerplay.pp_handle);
+
+- if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
+- amdgpu_ucode_fini_bo(adev);
+-
+ return ret;
+ }
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+index 80deddc..bec941a 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+@@ -451,8 +451,6 @@ static int psp_hw_fini(void *handle)
+ if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)
+ return 0;
+
+- amdgpu_ucode_fini_bo(adev);
+-
+ psp_ring_destroy(psp, PSP_RING_TYPE__KM);
+
+ amdgpu_bo_free_kernel(&psp->tmr_bo, &psp->tmr_mc_addr, &psp->tmr_buf);
+--
+2.7.4
+