瀏覽代碼

drm/amdgpu: Correct the amdgpu_ucode_fini_bo place for Tonga

The amdgpu_ucode_fini_bo should be called after gfx_v8_0_hw_fini,
or it will have KCQ disable failed issue.

For Tonga, as it firstly finishes SMC block, and the SMC hw fini
will call amdgpu_ucode_fini, which will lead the amdgpu_ucode_fini_bo
called before gfx_v8_0_hw_fini, this is incorrect.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Emily Deng 7 年之前
父節點
當前提交
edc3d27cbb
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 3 0
      drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
  2. 0 3
      drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c

+ 3 - 0
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

@@ -1457,6 +1457,9 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
 	}
 	}
 
 
 	for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
 	for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
+		if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SMC &&
+			adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
+			amdgpu_ucode_fini_bo(adev);
 		if (!adev->ip_blocks[i].status.hw)
 		if (!adev->ip_blocks[i].status.hw)
 			continue;
 			continue;
 
 

+ 0 - 3
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c

@@ -162,9 +162,6 @@ static int amdgpu_pp_hw_fini(void *handle)
 		ret = adev->powerplay.ip_funcs->hw_fini(
 		ret = adev->powerplay.ip_funcs->hw_fini(
 					adev->powerplay.pp_handle);
 					adev->powerplay.pp_handle);
 
 
-	if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
-		amdgpu_ucode_fini_bo(adev);
-
 	return ret;
 	return ret;
 }
 }