include/uapi/drm/amdgpu_drm.h
Source file repositories/reference/linux-study-clean/include/uapi/drm/amdgpu_drm.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/drm/amdgpu_drm.h- Extension
.h- Size
- 52367 bytes
- Lines
- 1681
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
drm.h
Detected Declarations
struct drm_amdgpu_gem_create_instruct drm_amdgpu_gem_create_outstruct drm_amdgpu_bo_list_instruct drm_amdgpu_bo_list_entrystruct drm_amdgpu_bo_list_outstruct drm_amdgpu_ctx_instruct drm_amdgpu_userq_instruct drm_amdgpu_userq_outstruct drm_amdgpu_userq_mqd_gfx11struct drm_amdgpu_userq_mqd_sdma_gfx11struct drm_amdgpu_userq_mqd_compute_gfx11struct drm_amdgpu_userq_signalstruct drm_amdgpu_userq_fence_infostruct drm_amdgpu_userq_waitstruct drm_amdgpu_vm_instruct drm_amdgpu_vm_outstruct drm_amdgpu_sched_instruct drm_amdgpu_gem_userptrstruct drm_amdgpu_gem_metadatastruct drm_amdgpu_gem_mmap_instruct drm_amdgpu_gem_mmap_outstruct drm_amdgpu_gem_wait_idle_instruct drm_amdgpu_gem_wait_idle_outstruct drm_amdgpu_wait_cs_instruct drm_amdgpu_wait_cs_outstruct drm_amdgpu_fencestruct drm_amdgpu_wait_fences_instruct drm_amdgpu_wait_fences_outstruct drm_amdgpu_gem_vm_entrystruct drm_amdgpu_gem_opstruct drm_amdgpu_gem_list_handlesstruct drm_amdgpu_gem_list_handles_entrystruct drm_amdgpu_gem_vastruct drm_amdgpu_cs_chunkstruct drm_amdgpu_cs_instruct drm_amdgpu_cs_outstruct drm_amdgpu_cs_chunk_ibstruct drm_amdgpu_cs_chunk_depstruct drm_amdgpu_cs_chunk_fencestruct drm_amdgpu_cs_chunk_semstruct drm_amdgpu_cs_chunk_syncobjstruct drm_amdgpu_cs_chunk_datastruct drm_amdgpu_cs_chunk_cp_gfx_shadowstruct drm_amdgpu_query_fwstruct drm_amdgpu_infostruct drm_amdgpu_info_gdsstruct drm_amdgpu_info_vram_gttstruct drm_amdgpu_heap_info
Annotated Snippet
struct drm_amdgpu_gem_create_in {
/** the requested memory size */
__u64 bo_size;
/** physical start_addr alignment in bytes for some HW requirements */
__u64 alignment;
/** the requested memory domains */
__u64 domains;
/** allocation flags */
__u64 domain_flags;
};
struct drm_amdgpu_gem_create_out {
/** returned GEM object handle */
__u32 handle;
__u32 _pad;
};
union drm_amdgpu_gem_create {
struct drm_amdgpu_gem_create_in in;
struct drm_amdgpu_gem_create_out out;
};
/** Opcode to create new residency list. */
#define AMDGPU_BO_LIST_OP_CREATE 0
/** Opcode to destroy previously created residency list */
#define AMDGPU_BO_LIST_OP_DESTROY 1
/** Opcode to update resource information in the list */
#define AMDGPU_BO_LIST_OP_UPDATE 2
struct drm_amdgpu_bo_list_in {
/** Type of operation */
__u32 operation;
/** Handle of list or 0 if we want to create one */
__u32 list_handle;
/** Number of BOs in list */
__u32 bo_number;
/** Size of each element describing BO */
__u32 bo_info_size;
/** Pointer to array describing BOs */
__u64 bo_info_ptr;
};
struct drm_amdgpu_bo_list_entry {
/** Handle of BO */
__u32 bo_handle;
/** New (if specified) BO priority to be used during migration */
__u32 bo_priority;
};
struct drm_amdgpu_bo_list_out {
/** Handle of resource list */
__u32 list_handle;
__u32 _pad;
};
union drm_amdgpu_bo_list {
struct drm_amdgpu_bo_list_in in;
struct drm_amdgpu_bo_list_out out;
};
/* context related */
#define AMDGPU_CTX_OP_ALLOC_CTX 1
#define AMDGPU_CTX_OP_FREE_CTX 2
#define AMDGPU_CTX_OP_QUERY_STATE 3
#define AMDGPU_CTX_OP_QUERY_STATE2 4
#define AMDGPU_CTX_OP_GET_STABLE_PSTATE 5
#define AMDGPU_CTX_OP_SET_STABLE_PSTATE 6
/* GPU reset status */
#define AMDGPU_CTX_NO_RESET 0
/* this the context caused it */
#define AMDGPU_CTX_GUILTY_RESET 1
/* some other context caused it */
#define AMDGPU_CTX_INNOCENT_RESET 2
/* unknown cause */
#define AMDGPU_CTX_UNKNOWN_RESET 3
/* indicate gpu reset occurred after ctx created */
#define AMDGPU_CTX_QUERY2_FLAGS_RESET (1<<0)
/* indicate vram lost occurred after ctx created */
#define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1<<1)
/* indicate some job from this context once cause gpu hang */
#define AMDGPU_CTX_QUERY2_FLAGS_GUILTY (1<<2)
/* indicate some errors are detected by RAS */
#define AMDGPU_CTX_QUERY2_FLAGS_RAS_CE (1<<3)
#define AMDGPU_CTX_QUERY2_FLAGS_RAS_UE (1<<4)
/* indicate that the reset hasn't completed yet */
#define AMDGPU_CTX_QUERY2_FLAGS_RESET_IN_PROGRESS (1<<5)
/* Context priority level */
Annotation
- Immediate include surface: `drm.h`.
- Detected declarations: `struct drm_amdgpu_gem_create_in`, `struct drm_amdgpu_gem_create_out`, `struct drm_amdgpu_bo_list_in`, `struct drm_amdgpu_bo_list_entry`, `struct drm_amdgpu_bo_list_out`, `struct drm_amdgpu_ctx_in`, `struct drm_amdgpu_userq_in`, `struct drm_amdgpu_userq_out`, `struct drm_amdgpu_userq_mqd_gfx11`, `struct drm_amdgpu_userq_mqd_sdma_gfx11`.
- Atlas domain: Repository Root And Misc / include.
- 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.