drivers/accel/ivpu/vpu_jsm_api.h
Source file repositories/reference/linux-study-clean/drivers/accel/ivpu/vpu_jsm_api.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/accel/ivpu/vpu_jsm_api.h- Extension
.h- Size
- 57902 bytes
- Lines
- 1759
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct vpu_job_queue_entrystruct vpu_inline_cmdstruct fencestruct vpu_job_queue_headerstruct vpu_job_queuestruct vpu_hws_log_buffer_headerstruct vpu_hws_log_buffer_entrystruct vpu_hws_native_fence_log_headerstruct vpu_hws_native_fence_log_entrystruct vpu_hws_native_fence_log_bufferstruct vpu_ipc_msg_payload_engine_resetstruct vpu_ipc_msg_payload_engine_preemptstruct vpu_ipc_msg_payload_register_dbstruct vpu_ipc_msg_payload_unregister_dbstruct vpu_ipc_msg_payload_query_engine_hbstruct vpu_ipc_msg_payload_power_levelstruct vpu_ipc_msg_payload_ssid_releasestruct vpu_jsm_metric_streamer_startstruct vpu_jsm_metric_streamer_stopstruct vpu_jsm_metric_streamer_updatestruct vpu_ipc_msg_payload_job_donestruct vpu_ipc_msg_payload_native_fence_signalledstruct vpu_jsm_engine_reset_contextstruct vpu_ipc_msg_payload_engine_reset_donestruct vpu_ipc_msg_payload_engine_preempt_donestruct vpu_ipc_msg_payload_register_db_donestruct vpu_ipc_msg_payload_unregister_db_donestruct vpu_ipc_msg_payload_query_engine_hb_donestruct vpu_ipc_msg_payload_get_power_level_count_donestruct vpu_ipc_msg_payload_hws_priority_band_setupstruct vpu_ipc_msg_payload_hws_create_cmdqstruct vpu_ipc_msg_payload_hws_create_cmdq_rspstruct vpu_ipc_msg_payload_hws_destroy_cmdqstruct vpu_ipc_msg_payload_hws_set_context_sched_propertiesstruct vpu_jsm_hws_register_dbstruct vpu_ipc_msg_payload_hws_set_scheduling_logstruct vpu_ipc_msg_payload_hws_scheduling_log_notificationstruct vpu_ipc_msg_payload_hws_suspend_cmdqstruct vpu_ipc_msg_payload_hws_resume_cmdqstruct vpu_ipc_msg_payload_hws_resume_enginestruct vpu_ipc_msg_payload_trace_configstruct vpu_ipc_msg_payload_trace_capability_rspstruct vpu_ipc_msg_payload_trace_get_namestruct vpu_ipc_msg_payload_trace_get_name_rspstruct vpu_jsm_metric_streamer_donestruct vpu_jsm_metric_group_descriptorstruct vpu_jsm_metric_counter_descriptorstruct vpu_ipc_msg_payload_dyndbg_control
Annotated Snippet
struct vpu_job_queue_entry {
/** Address of VPU commands batch buffer */
u64 batch_buf_addr;
/** Job ID */
u32 job_id;
/** Flags bit field, see VPU_JOB_FLAGS_* above */
u32 flags;
/**
* Doorbell ring timestamp taken by KMD from SoC's global system clock, in
* microseconds. NPU can convert this value to its own fixed clock's timebase,
* to match other profiling timestamps.
*/
u64 doorbell_timestamp;
/** Extra id for job tracking, used only in the firmware perf traces */
u64 host_tracking_id;
/** Address of the primary preemption buffer to use for this job */
u64 primary_preempt_buf_addr;
/** Size of the primary preemption buffer to use for this job */
u32 primary_preempt_buf_size;
/** Size of secondary preemption buffer to use for this job */
u32 secondary_preempt_buf_size;
/** Address of secondary preemption buffer to use for this job */
u64 secondary_preempt_buf_addr;
u64 reserved_0;
};
/**
* Inline command format.
* Inline commands are the commands executed at scheduler level (typically,
* synchronization directives). Inline command and job objects must be of
* the same size and have flags field at same offset.
*/
struct vpu_inline_cmd {
u64 reserved_0;
/** Inline command type, see VPU_INLINE_CMD_TYPE_* defines. */
u32 type;
/** Flags bit field, see VPU_JOB_FLAGS_* above. */
u32 flags;
/** Inline command payload. Depends on inline command type. */
union payload {
/** Fence (wait and signal) commands' payload. */
struct fence {
/** Fence object handle. */
u64 fence_handle;
/** User VA of the current fence value. */
u64 current_value_va;
/** User VA of the monitored fence value (read-only). */
u64 monitored_value_va;
/** Value to wait for or write in fence location. */
u64 value;
/** User VA of the log buffer in which to add log entry on completion. */
u64 log_buffer_va;
/** NPU private data. */
u64 npu_private_data;
} fence;
/**
* Other commands do not have a payload:
* Payload definition for future inline commands can be inserted here.
*/
u64 reserved_1[6];
} payload;
};
/**
* Job queue slots can be populated either with job objects or inline command objects.
*/
union vpu_jobq_slot {
struct vpu_job_queue_entry job;
struct vpu_inline_cmd inline_cmd;
};
/**
* Job queue control registers.
*/
struct vpu_job_queue_header {
u32 engine_idx;
u32 head;
u32 tail;
u32 flags;
/** Set to 1 to indicate priority_band field is valid */
u32 priority_band_valid;
/**
* Priority for the work of this job queue, valid only if the HWS is NOT used
* and the @ref priority_band_valid is set to 1. It is applied only during
* the @ref VPU_JSM_MSG_REGISTER_DB message processing.
* The device firmware might use the priority_band to optimize the power
* management logic, but it will not affect the order of jobs.
* Available priority bands: @see enum vpu_job_scheduling_priority_band
*/
u32 priority_band;
Annotation
- Detected declarations: `struct vpu_job_queue_entry`, `struct vpu_inline_cmd`, `struct fence`, `struct vpu_job_queue_header`, `struct vpu_job_queue`, `struct vpu_hws_log_buffer_header`, `struct vpu_hws_log_buffer_entry`, `struct vpu_hws_native_fence_log_header`, `struct vpu_hws_native_fence_log_entry`, `struct vpu_hws_native_fence_log_buffer`.
- 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.