summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2022-11-25 17:04:25 +0100
committerAlex Deucher <alexander.deucher@amd.com>2022-12-14 09:48:33 -0500
commite44a0fe630c58b0a87d8281f5c1077a3479e5fce (patch)
treef9e96d4abf046dcd2981ab78705e1ff68b449558 /drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h
parent053499f7b45dc56758240615569b349fe9e2fc8d (diff)
drm/amdgpu: rework reserved VMID handling
Instead of reserving a VMID for a single process allow that many processes use the reserved ID. This allows for proper isolation between the processes. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h
index 57efe61dceed..d1cc09b45da4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.h
@@ -67,7 +67,8 @@ struct amdgpu_vmid_mgr {
unsigned num_ids;
struct list_head ids_lru;
struct amdgpu_vmid ids[AMDGPU_NUM_VMID];
- atomic_t reserved_vmid_num;
+ struct amdgpu_vmid *reserved;
+ unsigned int reserved_use_count;
};
int amdgpu_pasid_alloc(unsigned int bits);