Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rex Zhu and committed by
Alex Deucher
5b2a3d2c 57716327

+1 -1
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 1580 1580 if (!adev->ip_blocks[i].status.valid) 1581 1581 continue; 1582 1582 /* ungate blocks so that suspend can properly shut them down */ 1583 - if (i != AMD_IP_BLOCK_TYPE_SMC && 1583 + if (adev->ip_blocks[i].version->type != AMD_IP_BLOCK_TYPE_SMC && 1584 1584 adev->ip_blocks[i].version->funcs->set_clockgating_state) { 1585 1585 r = adev->ip_blocks[i].version->funcs->set_clockgating_state((void *)adev, 1586 1586 AMD_CG_STATE_UNGATE);