drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.h- Extension
.h- Size
- 2750 bytes
- Lines
- 75
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hamdgpu_userq.h
Detected Declarations
struct amdgpu_userq_fencestruct amdgpu_userq_fence_driver
Annotated Snippet
struct amdgpu_userq_fence {
struct dma_fence base;
/*
* This lock is necessary to synchronize the
* userqueue dma fence operations.
*/
spinlock_t lock;
struct list_head link;
unsigned long fence_drv_array_count;
struct amdgpu_userq_fence_driver *fence_drv;
struct amdgpu_userq_fence_driver **fence_drv_array;
};
struct amdgpu_userq_fence_driver {
struct kref refcount;
u64 va;
u64 gpu_addr;
u64 *cpu_addr;
u64 context;
/*
* This lock is necesaary to synchronize the access
* to the fences list by the fence driver.
*/
spinlock_t fence_list_lock;
struct list_head fences;
struct amdgpu_device *adev;
char timeline_name[TASK_COMM_LEN];
};
void amdgpu_userq_fence_driver_get(struct amdgpu_userq_fence_driver *fence_drv);
void amdgpu_userq_fence_driver_put(struct amdgpu_userq_fence_driver *fence_drv);
int amdgpu_userq_fence_driver_alloc(struct amdgpu_device *adev,
struct amdgpu_userq_fence_driver **fence_drv_req);
void amdgpu_userq_fence_driver_free(struct amdgpu_usermode_queue *userq);
int amdgpu_userq_fence_driver_process(struct amdgpu_userq_fence_driver *fence_drv);
void amdgpu_userq_fence_driver_force_completion(struct amdgpu_usermode_queue *userq);
void amdgpu_userq_fence_driver_destroy(struct kref *ref);
int amdgpu_userq_signal_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp);
int amdgpu_userq_wait_ioctl(struct drm_device *dev, void *data,
struct drm_file *filp);
#endif
Annotation
- Immediate include surface: `linux/types.h`, `amdgpu_userq.h`.
- Detected declarations: `struct amdgpu_userq_fence`, `struct amdgpu_userq_fence_driver`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.