From: Mukul Joshi Date: Fri, 8 Aug 2025 21:33:59 +0000 (-0400) Subject: drm/amdgpu: Report correct compute partition mode on GFX 12.1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd25254f0bdd8c604052e88a8a77e8e9af8f4c87;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Alex Sierra Reviewed-by: Michael Chen Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c index ec9754f687d0..23544cef4101 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 &&