From: Mukul Joshi <[email protected]> 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 <[email protected]> Reviewed-by: Alex Sierra <[email protected]> Reviewed-by: Michael Chen <[email protected]> Signed-off-by: Alex Deucher <[email protected]> --- drivers/gpu/drm/amd/amdgpu/soc_v1_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c index ec9754f687d00..23544cef4101c 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c @@ -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 && -- 2.52.0
