drivers/staging/media/atomisp/pci/ia_css_event_public.h

Source file repositories/reference/linux-study-clean/drivers/staging/media/atomisp/pci/ia_css_event_public.h

File Facts

System
Linux kernel
Corpus path
drivers/staging/media/atomisp/pci/ia_css_event_public.h
Extension
.h
Size
7196 bytes
Lines
175
Domain
Driver Families
Bucket
drivers/staging
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 ia_css_event {
	struct ia_css_pipe    *pipe;
	/** Pipe handle on which event happened, NULL for non pipe related
	     events. */
	enum ia_css_event_type type;
	/** Type of Event, always valid/filled. */
	u8                port;
	/** Port number for EOF event (not valid for other events). */
	u8                exp_id;
	/** Exposure id for EOF/FRAME_TAGGED/FW_WARNING event (not valid for other events)
	     The exposure ID is unique only within a logical stream and it is
	     only generated on systems that have an input system (such as 2400
	     and 2401).
	     Most outputs produced by the CSS are tagged with an exposure ID.
	     This allows users of the CSS API to keep track of which buffer
	     was generated from which sensor output frame. This includes:
	     EOF event, output frames, 3A statistics, DVS statistics and
	     sensor metadata.
	     Exposure IDs start at IA_CSS_MIN_EXPOSURE_ID, increment by one
	     until IA_CSS_MAX_EXPOSURE_ID is reached, after that they wrap
	     around to IA_CSS_MIN_EXPOSURE_ID again.
	     Note that in case frames are dropped, this will not be reflected
	     in the exposure IDs. Therefor applications should not use this
	     to detect frame drops. */
	u32               fw_handle;
	/** Firmware Handle for ACC_STAGE_COMPLETE event (not valid for other
	     events). */
	enum ia_css_fw_warning fw_warning;
	/** Firmware warning code, only for WARNING events. */
	u8                fw_assert_module_id;
	/** Firmware module id, only for ASSERT events, should be logged by driver. */
	u16               fw_assert_line_no;
	/** Firmware line number, only for ASSERT events, should be logged by driver. */
	clock_value_t	       timer_data;
	/** For storing the full 32-bit of the timer value. Valid only for TIMER
	     event */
	u8                timer_code;
	/** For storing the code of the TIMER event. Valid only for
	     TIMER event */
	u8                timer_subcode;
	/** For storing the subcode of the TIMER event. Valid only
	     for TIMER event */
};

/* @brief Dequeue a PSYS event from the CSS system.
 *
 * @param[out]	event   Pointer to the event struct which will be filled by
 *                      this function if an event is available.
 * @return		-ENODATA if no events are
 *			available or
 *			0 otherwise.
 *
 * This function dequeues an event from the PSYS event queue. The queue is
 * between the Host CPU and the CSS system. This function can be
 * called after an interrupt has been generated that signalled that a new event
 * was available and can be used in a polling-like situation where the NO_EVENT
 * return value is used to determine whether an event was available or not.
 */
int
ia_css_dequeue_psys_event(struct ia_css_event *event);

/* @brief Dequeue an ISYS event from the CSS system.
 *
 * @param[out]	event   Pointer to the event struct which will be filled by
 *                      this function if an event is available.
 * @return		-ENODATA if no events are
 *			available or
 *			0 otherwise.
 *
 * This function dequeues an event from the ISYS event queue. The queue is
 * between host and the CSS system.
 * Unlike the ia_css_dequeue_psys_event() function, this function can be called
 * directly from an interrupt service routine (ISR) and it is safe to call
 * this function in parallel with other CSS API functions (but only one
 * call to this function should be in flight at any point in time).
 *
 * The reason for having the ISYS events separate is to prevent them from
 * incurring additional latency due to locks being held by other CSS API
 * functions.
 */
int
ia_css_dequeue_isys_event(struct ia_css_event *event);

#endif /* __IA_CSS_EVENT_PUBLIC_H */

Annotation

Implementation Notes