Skip to content

Commit 631c54f

Browse files
Hawking Zhangalexdeucher
authored andcommitted
drm/amd/pm: Do not support swSMU if SMU IP is disabled
When SMU IP is disabled by ip_block_mask, driver should not refer to any dpm/swSMU callback. Instead, any driver call into swSMU/dpm callback needs to return error code EOPNOTSUPP. Signed-off-by: Hawking Zhang <[email protected]> Reviewed-by: Yang Wang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent c299cb6 commit 631c54f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,8 @@ bool is_support_sw_smu(struct amdgpu_device *adev)
549549
if (adev->asic_type == CHIP_VEGA20)
550550
return false;
551551

552-
if (amdgpu_ip_version(adev, MP1_HWIP, 0) >= IP_VERSION(11, 0, 0))
552+
if ((amdgpu_ip_version(adev, MP1_HWIP, 0) >= IP_VERSION(11, 0, 0)) &&
553+
amdgpu_device_ip_is_valid(adev, AMD_IP_BLOCK_TYPE_SMC))
553554
return true;
554555

555556
return false;

0 commit comments

Comments
 (0)