summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAsad Kamal <asad.kamal@amd.com>2024-07-22 19:45:11 +0800
committerAlex Deucher <alexander.deucher@amd.com>2024-09-18 16:15:08 -0400
commitef126c06a98bde1a41303970eb0fc0ac33c3cc02 (patch)
tree000f21457de7e0d9faf9c5e48e96bb9762087f36 /drivers/gpu
parent06c9aeb57fe894e6e442cd66870cd3e863bbf08c (diff)
downloadlwn-ef126c06a98bde1a41303970eb0fc0ac33c3cc02.tar.gz
lwn-ef126c06a98bde1a41303970eb0fc0ac33c3cc02.zip
drm/amdgpu: Fix get each xcp macro
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
index 90138bc5f03d..32775260556f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
@@ -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