linux/drivers/gpu
Srinivasan Shanmugam 636df65409 drm/amdgpu: Allow PASID allocator to store fpriv owner
AMDGPU already has a global PASID xarray used for PASID allocation.

Allow amdgpu_pasid_alloc() to optionally store the owning DRM
file-private object directly.

Initial callers pass NULL. A later patch in this series passes the DRM
file-private object for DRM PASIDs.

This prepares for using:

	PASID -> fpriv -> VM

instead of:

	PASID -> VM

Clear the stored owner from amdgpu_pasid_free_delayed() before waiting
for outstanding fences so PASID lookups cannot observe a stale fpriv
while the PASID itself is pending delayed release.

v6:
- Correct the PASID allocator kernel-doc to refer to the XArray cyclic
  allocator.
- Document that PASID owner lookup may return NULL and that the returned
  fpriv remains valid only while the PASID lock is held.
- No code changes. Retain Christian's Reviewed-by tag.

v5:
- Store NULL instead of xa_mk_value(0) for ownerless PASIDs.
- Simplify owner clearing by unconditionally storing NULL.

v4:
- Add fpriv as an optional parameter to amdgpu_pasid_alloc().
- Drop separate amdgpu_pasid_set_fpriv()/clear_fpriv() helpers.
- Clear PASID owner from amdgpu_pasid_free_delayed().

Cc: Alex Deucher <alexander.deucher@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-28 18:29:00 -04:00
..
drm drm/amdgpu: Allow PASID allocator to store fpriv owner 2026-07-28 18:29:00 -04:00
host1x gpu: host1x: Fix iommu_map_sgtable() return value check 2026-05-28 17:19:30 +02:00
ipu-v3
nova-core drm-next for 7.2-rc1 2026-06-17 10:21:00 +01:00
tests
trace
vga fbdev: Wrap fbcon updates from vga-switcheroo in helper 2026-06-09 16:00:11 +02:00
buddy.c gpu/buddy: Track per-order used blocks with a scoreboard 2026-05-29 13:44:01 +02:00
Kconfig
Makefile