]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: Report correct compute partition mode on GFX 12.1
authorMukul Joshi <mukul.joshi@amd.com>
Fri, 8 Aug 2025 21:33:59 +0000 (17:33 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Jan 2026 21:27:17 +0000 (16:27 -0500)
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>
drivers/gpu/drm/amd/amdgpu/soc_v1_0.c

index ec9754f687d00c1318c667f3720c1e9a1b50eaa4..23544cef4101c118f8fe36e9719202147addaf71 100644 (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 &&