drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h- Extension
.h- Size
- 4087 bytes
- Lines
- 113
- 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
amdgpu_ring.hamdgpu_irq.hvpe_6_1_fw_if.h
Detected Declarations
struct amdgpu_vpestruct vpe_funcsstruct vpe_regsstruct amdgpu_vpe
Annotated Snippet
struct vpe_funcs {
uint32_t (*get_reg_offset)(struct amdgpu_vpe *vpe, uint32_t inst, uint32_t offset);
int (*set_regs)(struct amdgpu_vpe *vpe);
int (*irq_init)(struct amdgpu_vpe *vpe);
int (*init_microcode)(struct amdgpu_vpe *vpe);
int (*load_microcode)(struct amdgpu_vpe *vpe);
int (*ring_init)(struct amdgpu_vpe *vpe);
int (*ring_start)(struct amdgpu_vpe *vpe);
int (*ring_stop)(struct amdgpu_vpe *vpe);
int (*ring_fini)(struct amdgpu_vpe *vpe);
};
struct vpe_regs {
uint32_t queue0_rb_rptr_lo;
uint32_t queue0_rb_rptr_hi;
uint32_t queue0_rb_wptr_lo;
uint32_t queue0_rb_wptr_hi;
uint32_t queue0_preempt;
uint32_t dpm_enable;
uint32_t dpm_pratio;
uint32_t dpm_request_interval;
uint32_t dpm_decision_threshold;
uint32_t dpm_busy_clamp_threshold;
uint32_t dpm_idle_clamp_threshold;
uint32_t dpm_request_lv;
uint32_t context_indicator;
};
struct amdgpu_vpe {
struct amdgpu_ring ring;
struct amdgpu_irq_src trap_irq;
const struct vpe_funcs *funcs;
struct vpe_regs regs;
const struct firmware *fw;
uint32_t fw_version;
uint32_t feature_version;
struct amdgpu_bo *cmdbuf_obj;
uint64_t cmdbuf_gpu_addr;
uint32_t *cmdbuf_cpu_addr;
struct delayed_work idle_work;
bool context_started;
uint32_t num_instances;
bool collaborate_mode;
uint32_t supported_reset;
};
int amdgpu_vpe_psp_update_sram(struct amdgpu_device *adev);
int amdgpu_vpe_init_microcode(struct amdgpu_vpe *vpe);
int amdgpu_vpe_ring_init(struct amdgpu_vpe *vpe);
int amdgpu_vpe_ring_fini(struct amdgpu_vpe *vpe);
int amdgpu_vpe_configure_dpm(struct amdgpu_vpe *vpe);
void amdgpu_vpe_sysfs_reset_mask_fini(struct amdgpu_device *adev);
int amdgpu_vpe_sysfs_reset_mask_init(struct amdgpu_device *adev);
#define vpe_ring_init(vpe) ((vpe)->funcs->ring_init ? (vpe)->funcs->ring_init((vpe)) : 0)
#define vpe_ring_start(vpe) ((vpe)->funcs->ring_start ? (vpe)->funcs->ring_start((vpe)) : 0)
#define vpe_ring_stop(vpe) ((vpe)->funcs->ring_stop ? (vpe)->funcs->ring_stop((vpe)) : 0)
#define vpe_ring_fini(vpe) ((vpe)->funcs->ring_fini ? (vpe)->funcs->ring_fini((vpe)) : 0)
#define vpe_get_reg_offset(vpe, inst, offset) \
((vpe)->funcs->get_reg_offset ? (vpe)->funcs->get_reg_offset((vpe), (inst), (offset)) : 0)
#define vpe_set_regs(vpe) \
((vpe)->funcs->set_regs ? (vpe)->funcs->set_regs((vpe)) : 0)
#define vpe_irq_init(vpe) \
((vpe)->funcs->irq_init ? (vpe)->funcs->irq_init((vpe)) : 0)
#define vpe_init_microcode(vpe) \
((vpe)->funcs->init_microcode ? (vpe)->funcs->init_microcode((vpe)) : 0)
#define vpe_load_microcode(vpe) \
((vpe)->funcs->load_microcode ? (vpe)->funcs->load_microcode((vpe)) : 0)
extern const struct amdgpu_ip_block_version vpe_v6_1_ip_block;
extern const struct amdgpu_ip_block_version vpe_v2_0_ip_block;
#endif
Annotation
- Immediate include surface: `amdgpu_ring.h`, `amdgpu_irq.h`, `vpe_6_1_fw_if.h`.
- Detected declarations: `struct amdgpu_vpe`, `struct vpe_funcs`, `struct vpe_regs`, `struct amdgpu_vpe`.
- 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.