drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h
Extension
.h
Size
2652 bytes
Lines
84
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct amdgpu_bo_list_entry {
	struct amdgpu_bo		*bo;
	struct amdgpu_bo_va		*bo_va;
	uint32_t			priority;
	struct amdgpu_hmm_range		*range;
	bool				user_invalidated;
};

struct amdgpu_bo_list {
	struct rcu_head rhead;
	struct kref refcount;
	struct amdgpu_bo *gds_obj;
	struct amdgpu_bo *gws_obj;
	struct amdgpu_bo *oa_obj;
	unsigned first_userptr;
	unsigned num_entries;

	/* Protect access during command submission.
	 */
	struct mutex bo_list_mutex;

	struct amdgpu_bo_list_entry entries[] __counted_by(num_entries);
};

int amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id,
		       struct amdgpu_bo_list **result);
void amdgpu_bo_list_put(struct amdgpu_bo_list *list);
int amdgpu_bo_create_list_entry_array(struct drm_amdgpu_bo_list_in *in,
				      struct drm_amdgpu_bo_list_entry **info_param);

int amdgpu_bo_list_create(struct amdgpu_device *adev,
				 struct drm_file *filp,
				 struct drm_amdgpu_bo_list_entry *info,
				 size_t num_entries,
				 struct amdgpu_bo_list **list);

#define amdgpu_bo_list_for_each_entry(e, list) \
	for (e = list->entries; \
	     e != &list->entries[list->num_entries]; \
	     ++e)

#define amdgpu_bo_list_for_each_userptr_entry(e, list) \
	for (e = &list->entries[list->first_userptr]; \
	     e != &list->entries[list->num_entries]; \
	     ++e)

#endif

Annotation

Implementation Notes