drm/amdgpu: Report correct compute partition mode on GFX 12.1

PSP programs the NBIO partition status register. In the absence of PSP,
read the current compute partition from the GFX IMU register instead of
NBIO.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Reviewed-by: Michael Chen <michael.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Mukul Joshi 2025-08-08 17:33:59 -04:00 committed by Alex Deucher
parent b78ec282bb
commit fd25254f0b

View File

@ -379,7 +379,7 @@ static int soc_v1_0_query_partition_mode(struct amdgpu_xcp_mgr *xcp_mgr)
mode = AMDGPU_UNKNOWN_COMPUTE_PARTITION_MODE;
derv_mode = __soc_v1_0_calc_xcp_mode(xcp_mgr);
if (amdgpu_sriov_vf(adev))
if (amdgpu_sriov_vf(adev) || !adev->psp.funcs)
return derv_mode;
if (adev->nbio.funcs &&