]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amdgpu: Fix get each xcp macro
authorAsad Kamal <asad.kamal@amd.com>
Mon, 22 Jul 2024 11:45:11 +0000 (19:45 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Sep 2024 20:15:08 +0000 (16:15 -0400)
Fix get each xcp macro to loop over each partition correctly

Fixes: 4bdca2057933 ("drm/amdgpu: Add utility functions for xcp")
Signed-off-by: Asad Kamal <asad.kamal@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h

index 90138bc5f03d1c926a1d3bb6b16227510356aee2..32775260556f44324e56f10040b30ebf6461c878 100644 (file)
@@ -180,6 +180,6 @@ amdgpu_get_next_xcp(struct amdgpu_xcp_mgr *xcp_mgr, int *from)
 
 #define for_each_xcp(xcp_mgr, xcp, i)                            \
        for (i = 0, xcp = amdgpu_get_next_xcp(xcp_mgr, &i); xcp; \
-            xcp = amdgpu_get_next_xcp(xcp_mgr, &i))
+            ++i, xcp = amdgpu_get_next_xcp(xcp_mgr, &i))
 
 #endif