diff options
author | Philip Yang <Philip.Yang@amd.com> | 2023-03-04 03:45:45 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-06-09 16:59:48 +0300 |
commit | d26ea1b346e71c07aa00956c32fe2d2dbec068ec (patch) | |
tree | 97b54a3837041fcfe3d890afff0d73ea61c93ab6 /drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | |
parent | 3e7c6fe38724eab767033f9d26b496bc2e815157 (diff) | |
download | linux-d26ea1b346e71c07aa00956c32fe2d2dbec068ec.tar.xz |
drm/amdgpu: Add xcp manager num_xcp_per_mem_partition
Used by KFD to check memory limit accounting.
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c index 9b960ba0b7ac..f2981d21d4e0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c @@ -156,6 +156,7 @@ int amdgpu_xcp_init(struct amdgpu_xcp_mgr *xcp_mgr, int num_xcps, int mode) xcp_mgr->num_xcps = num_xcps; amdgpu_xcp_update_partition_sched_list(adev); + xcp_mgr->num_xcp_per_mem_partition = num_xcps / xcp_mgr->adev->gmc.num_mem_partitions; return 0; } |