summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2025-06-06 00:26:07 +0800
committerAlex Deucher <alexander.deucher@amd.com>2025-12-08 13:56:30 -0500
commit7cd88efd16f46023d2359430bb49781e879229c7 (patch)
treea0a06d5a484beddc685e4a979d5ae790cdd87064 /drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
parentdcfe45bd860f0bdec82bfe3ae8632d231a6c4f28 (diff)
downloadlinux-next-7cd88efd16f46023d2359430bb49781e879229c7.tar.gz
linux-next-7cd88efd16f46023d2359430bb49781e879229c7.zip
drm/amdgpu: Move XCP_INST_MASK amdgpu_xcp.h
Move the common macro for xcp manger to amdgpu_xcp.h Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Likun Gao <Likun.Gao@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
index 1928d9e224fc..8058e8f35d41 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.h
@@ -41,6 +41,9 @@
#define AMDGPU_XCP_OPS_KFD (1 << 0)
+#define XCP_INST_MASK(num_inst, xcp_id) \
+ (num_inst ? GENMASK(num_inst - 1, 0) << (xcp_id * num_inst) : 0)
+
struct amdgpu_fpriv;
enum AMDGPU_XCP_IP_BLOCK {