drm/amdkfd: use correct method to get clock under SRIOV
authorHorace Chen <horace.chen@amd.com>
Thu, 17 Aug 2023 09:38:29 +0000 (17:38 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Aug 2023 18:59:21 +0000 (14:59 -0400)
commit0bc119fa2ebecd5a42a37fb22f27accb1f0ca75b
tree9ca39aa2f41c5f3217448e3866ae214a3cab0903
parent36b0f88988beecea6723d70fbde5b16939bf7543
drm/amdkfd: use correct method to get clock under SRIOV

[What]
Current SRIOV still using adev->clock.default_XX which gets from
atomfirmware. But these fields are abandoned in atomfirmware long ago.
Which may cause function to return a 0 value.

[How]
We don't need to check whether SR-IOV. For SR-IOV one-vf-mode,
pm is enabled and VF is able to read dpm clock
from pmfw, so we can use dpm clock interface directly. For
multi-VF mode, VF pm is disabled, so driver can just react as pm
disabled. One-vf-mode is introduced from GFX9 so it shall not have
any backward compatibility issue.

Signed-off-by: Horace Chen <horace.chen@amd.com>
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c