瀏覽代碼

drm/amdgpu: Don't compared ip_block_type with ip_block_index

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Rex Zhu 7 年之前
父節點
當前提交
5b2a3d2c15
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

+ 1 - 1
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

@@ -1580,7 +1580,7 @@ int amdgpu_device_ip_suspend(struct amdgpu_device *adev)
 		if (!adev->ip_blocks[i].status.valid)
 			continue;
 		/* ungate blocks so that suspend can properly shut them down */
-		if (i != AMD_IP_BLOCK_TYPE_SMC &&
+		if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_SMC &&
 			adev->ip_blocks[i].version->funcs->set_clockgating_state) {
 			r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev,
 										     AMD_CG_STATE_UNGATE);