Skip to contentSkip to conversation

Revert "drm/amdgpu: fix rmmod KCQ disable failed error"

PATCH In review Monk Liu 2 participants 3 messages Nov 24, 2017 – Nov 27, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Monk Liu

author
#0 lore raw

PATCH 1/1 Revert "drm/amdgpu: fix rmmod KCQ disable failed error"

This reverts commit ff8a0428d1b0e55db6b6e0462e2dc51c4d6724a8.

this patch is incorrrect, amdgpu_ucode_bo_fini always called after gfx_hw_fini

Change-Id: I7246ea0d2c7c843c14e9923c4d2efde4d90a9ef5

---
 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, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -3
index 285daa8..48e892e 100644
@@ -1914,9 +1914,6 @@ 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 +3 -0
index 033fba2..5f5aa5f 100644
@@ -164,6 +164,9 @@ 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 +2 -0
index f95a200..2157d45 100644
@@ -446,6 +446,8 @@ 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): 1511507192-6819-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

Anyone review this one ?

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Monk Liu
Sent: 2017年11月24日 15:07
To: [email protected]
Cc: Liu, Monk <[email protected]>
Subject: [PATCH] Revert "drm/amdgpu: fix rmmod KCQ disable failed error"

This reverts commit ff8a0428d1b0e55db6b6e0462e2dc51c4d6724a8.

this patch is incorrrect, amdgpu_ucode_bo_fini always called after gfx_hw_fini

Change-Id: I7246ea0d2c7c843c14e9923c4d2efde4d90a9ef5

---
 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, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -3
index 285daa8..48e892e 100644
@@ -1914,9 +1914,6 @@ 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 +3 -0
index 033fba2..5f5aa5f 100644
@@ -164,6 +164,9 @@ 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 +2 -0
index f95a200..2157d45 100644
@@ -446,6 +446,8 @@ 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
_______________________________________________
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): BLUPR12MB0449B0F2DDB5D1D8A21D274584250-7LeqcoF/[email protected]

Reviewed-by
#4 lore raw
Quoted 1 line · Monk

Anyone review this one ?

Quoted 63 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Monk Liu
Sent: 2017年11月24日 15:07
To: [email protected]
Cc: Liu, Monk <[email protected]>
Subject: [PATCH] Revert "drm/amdgpu: fix rmmod KCQ disable failed error"

This reverts commit ff8a0428d1b0e55db6b6e0462e2dc51c4d6724a8.

this patch is incorrrect, amdgpu_ucode_bo_fini always called after gfx_hw_fini

Change-Id: I7246ea0d2c7c843c14e9923c4d2efde4d90a9ef5

---
 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, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -3
index 285daa8..48e892e 100644
@@ -1914,9 +1914,6 @@ 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 +3 -0
index 033fba2..5f5aa5f 100644
@@ -164,6 +164,9 @@ 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 +2 -1
index f95a200..2157d45 100644
@@ -446,6 +446,8 @@ 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

Quoted 8 lines

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

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