drivers/media/platform/qcom/iris/iris_state.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/iris/iris_state.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/qcom/iris/iris_state.h
Extension
.h
Size
5292 bytes
Lines
147
Domain
Driver Families
Bucket
drivers/media
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

#ifndef __IRIS_STATE_H__
#define __IRIS_STATE_H__

struct iris_inst;

/**
 * enum iris_core_state
 *
 * @IRIS_CORE_DEINIT: default state.
 * @IRIS_CORE_INIT:   core state with core initialized. FW loaded and
 *                   HW brought out of reset, shared queues established
 *                   between host driver and firmware.
 * @IRIS_CORE_ERROR:  error state.
 *
 *        -----------
 *             |
 *             V
 *        -----------
 *   +--->| DEINIT  |<---+
 *   |   -----------    |
 *   |         |        |
 *   |         v        |
 *   |   -----------    |
 *   |     /     \      |
 *   |    /       \     |
 *   |   /         \    |
 *   |  v           v   v
 * -----------    -----------
 * |  INIT  |--->|  ERROR  |
 * -----------    -----------
 */
enum iris_core_state {
	IRIS_CORE_DEINIT,
	IRIS_CORE_INIT,
	IRIS_CORE_ERROR,
};

/**
 * enum iris_inst_state
 *
 * @IRIS_INST_INIT: video instance is opened.
 * @IRIS_INST_INPUT_STREAMING: stream on is completed on output plane.
 * @IRIS_INST_OUTPUT_STREAMING: stream on is completed on capture plane.
 * @IRIS_INST_STREAMING: stream on is completed on both output and capture planes.
 * @IRIS_INST_DEINIT: video instance is closed.
 * @IRIS_INST_ERROR: error state.
 *                    |
 *                    V
 *             -------------
 *   +--------|     INIT    |----------+
 *   |         -------------           |
 *   |            ^   ^                |
 *   |           /      \              |
 *   |          /        \             |
 *   |         v          v            |
 *   |   -----------    -----------    |
 *   |   |   INPUT         OUTPUT  |   |
 *   |---| STREAMING     STREAMING |---|
 *   |   -----------    -----------    |
 *   |       ^            ^            |
 *   |         \          /            |
 *   |          \        /             |
 *   |           v      v              |
 *   |         -------------           |
 *   |--------|  STREAMING |-----------|
 *   |        -------------            |
 *   |               |                 |
 *   |               |                 |
 *   |               v                 |
 *   |          -----------            |
 *   +-------->|  DEINIT   |<----------+
 *   |          -----------            |
 *   |               |                 |
 *   |               |                 |
 *   |               v                 |
 *   |          ----------             |
 *   +-------->|   ERROR |<------------+
 *              ----------
 */
enum iris_inst_state {
	IRIS_INST_DEINIT,
	IRIS_INST_INIT,
	IRIS_INST_INPUT_STREAMING,
	IRIS_INST_OUTPUT_STREAMING,
	IRIS_INST_STREAMING,
	IRIS_INST_ERROR,
};

#define IRIS_INST_SUB_STATES		8
#define IRIS_INST_MAX_SUB_STATE_VALUE	((1 << IRIS_INST_SUB_STATES) - 1)

Annotation

Implementation Notes