[RFC v2 13/15] drm/amdgpu: walk IP blocks in reverse order when shutdown

Jiang Liu gerry at linux.alibaba.com
Mon Jan 13 01:42:18 UTC 2025


Walk IP blocks in reverse order in function amdgpu_device_ip_fini_early
and amdgpu_device_smu_fini_early, to keep consistence with other finish
functions.

Signed-off-by: Jiang Liu <gerry at linux.alibaba.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index af356226fbca..a1501344f336 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3358,7 +3358,7 @@ static void amdgpu_device_smu_fini_early(struct amdgpu_device *adev)
 	if (amdgpu_ip_version(adev, GC_HWIP, 0) > IP_VERSION(9, 0, 0))
 		return;
 
-	amdgpu_for_each_ip_block(adev, ip_block) {
+	amdgpu_for_each_ip_block_reverse(adev, ip_block) {
 		if (amdgpu_ip_block_state(ip_block) < AMDGPU_IP_STATE_HW)
 			continue;
 		if (ip_block->version->type == AMD_IP_BLOCK_TYPE_SMC) {
@@ -3373,7 +3373,7 @@ static int amdgpu_device_ip_fini_early(struct amdgpu_device *adev)
 	int r;
 	struct amdgpu_ip_block *ip_block;
 
-	amdgpu_for_each_ip_block(adev, ip_block) {
+	amdgpu_for_each_ip_block_reverse(adev, ip_block) {
 		if (!ip_block->version->funcs->early_fini)
 			continue;
 
-- 
2.43.5



More information about the amd-gfx mailing list