Skip to contentSkip to conversation

drm/amdgpu: fix rmmod KCQ disable failed error

PATCH In review Wang Hongcheng 2 participants 2 messages Nov 17, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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
---
 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
index 3dcdee5..ad2ef41 100644
@@ -1892,6 +1892,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;
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +0 -3
index 5f5aa5f..033fba2 100644
@@ -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;
 }
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -2
index 2157d45..f95a200 100644
@@ -446,8 +446,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);
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1510899856-12575-1-git-send-email-Annie.Wang-5C7GfCeVMHo@public.gmane.org

Reviewed-by Rex Zhu
#2 lore raw

Best Regards
Rex
-----Original Message-----
From: Wang Hongcheng [mailto:[email protected]]
Sent: Friday, November 17, 2017 2:24 PM
To: [email protected]
Cc: Zhu, Rex; Wang, Annie
Subject: [PATCH] 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
---
 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
index 3dcdee5..ad2ef41 100644
@@ -1892,6 +1892,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;
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +0 -3
index 5f5aa5f..033fba2 100644
@@ -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;
 }
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -2
index 2157d45..f95a200 100644
@@ -446,8 +446,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

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx