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.

Dependency Surface

Detected Declarations

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

Implementation Notes