drivers/accel/ivpu/ivpu_drv.h
Source file repositories/reference/linux-study-clean/drivers/accel/ivpu/ivpu_drv.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/accel/ivpu/ivpu_drv.h- Extension
.h- Size
- 8619 bytes
- Lines
- 334
- Domain
- Driver Families
- Bucket
- drivers/accel
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
drm/drm_device.hdrm/drm_drv.hdrm/drm_managed.hdrm/drm_mm.hdrm/drm_print.hlinux/hashtable.hlinux/pci.hlinux/xarray.huapi/drm/ivpu_accel.hivpu_mmu_context.hivpu_ipc.h
Detected Declarations
struct ivpu_wa_tablestruct ivpu_hw_infostruct ivpu_mmu_infostruct ivpu_fw_infostruct ivpu_ipc_infostruct ivpu_pm_infostruct ivpu_user_limitsstruct ivpu_devicestruct ivpu_file_privfunction ivpu_revisionfunction ivpu_device_idfunction ivpu_hw_ip_genfunction ivpu_hw_btrs_genfunction ivpu_get_context_countfunction ivpu_get_doorbell_countfunction ivpu_get_platformfunction ivpu_is_siliconfunction ivpu_is_simicsfunction ivpu_is_fpgafunction ivpu_is_force_snoop_enabled
Annotated Snippet
struct ivpu_wa_table {
bool punit_disabled;
bool clear_runtime_mem;
bool interrupt_clear_with_0;
bool disable_clock_relinquish;
bool wp0_during_power_up;
bool disable_d0i2;
};
struct ivpu_hw_info;
struct ivpu_mmu_info;
struct ivpu_fw_info;
struct ivpu_ipc_info;
struct ivpu_pm_info;
struct ivpu_user_limits {
struct hlist_node hash_node;
struct ivpu_device *vdev;
struct kref ref;
u32 max_ctx_count;
u32 max_db_count;
u32 uid;
atomic_t db_count;
};
struct ivpu_device {
struct drm_device drm;
void __iomem *regb;
void __iomem *regv;
u32 platform;
u32 irq;
struct ivpu_wa_table wa;
struct ivpu_hw_info *hw;
struct ivpu_mmu_info *mmu;
struct ivpu_fw_info *fw;
struct ivpu_ipc_info *ipc;
struct ivpu_pm_info *pm;
struct ivpu_mmu_context gctx;
struct ivpu_mmu_context rctx;
struct mutex context_list_lock; /* Protects user context addition/removal */
struct xarray context_xa;
struct xa_limit context_xa_limit;
DECLARE_HASHTABLE(user_limits, 8);
struct mutex user_limits_lock; /* Protects user_limits */
struct xarray db_xa;
struct xa_limit db_limit;
u32 db_next;
struct work_struct irq_ipc_work;
struct work_struct irq_dct_work;
struct work_struct context_abort_work;
struct mutex bo_list_lock; /* Protects bo_list */
struct list_head bo_list;
struct mutex submitted_jobs_lock; /* Protects submitted_jobs */
struct xarray submitted_jobs_xa;
struct ivpu_ipc_consumer job_done_consumer;
atomic_t job_timeout_counter;
atomic_t faults_detected;
atomic64_t unique_id_counter;
ktime_t busy_start_ts;
ktime_t busy_time;
struct {
int boot;
int jsm;
int tdr;
int inference;
int autosuspend;
int d0i3_entry_msg;
int state_dump_msg;
} timeout;
};
/*
* file_priv has its own refcount (ref) that allows user space to close the fd
* without blocking even if VPU is still processing some jobs.
*/
struct ivpu_file_priv {
struct kref ref;
struct ivpu_device *vdev;
struct mutex lock; /* Protects cmdq */
struct xarray cmdq_xa;
struct ivpu_mmu_context ctx;
Annotation
- Immediate include surface: `drm/drm_device.h`, `drm/drm_drv.h`, `drm/drm_managed.h`, `drm/drm_mm.h`, `drm/drm_print.h`, `linux/hashtable.h`, `linux/pci.h`, `linux/xarray.h`.
- Detected declarations: `struct ivpu_wa_table`, `struct ivpu_hw_info`, `struct ivpu_mmu_info`, `struct ivpu_fw_info`, `struct ivpu_ipc_info`, `struct ivpu_pm_info`, `struct ivpu_user_limits`, `struct ivpu_device`, `struct ivpu_file_priv`, `function ivpu_revision`.
- Atlas domain: Driver Families / drivers/accel.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.