]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
drm/amdgpu: Don't compared ip_block_type with ip_block_index
authorRex Zhu <Rex.Zhu@amd.com>
Wed, 14 Mar 2018 07:38:48 +0000 (15:38 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Mar 2018 14:57:41 +0000 (09:57 -0500)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index a3e81e36a7eecd34f2c2a989527f45b8387a1c81..218f0efa39fb30e203bd01a5794f057d0e416dce 100644 (file)
@@ -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);