summaryrefslogtreecommitdiff
path: root/drivers/media/platform/qcom/iris/iris_instance.h
diff options
context:
space:
mode:
authorDikshita Agarwal <quic_dikshita@quicinc.com>2025-02-07 13:24:56 +0530
committerHans Verkuil <hverkuil@xs4all.nl>2025-02-07 11:51:33 +0100
commit11712ce70f8e52fc94365b48ee15aec806b02422 (patch)
tree14575f61be9d624523fe8dd3cef295cab26850a1 /drivers/media/platform/qcom/iris/iris_instance.h
parent1dc5c9700fcc4bf28df48ca980bd6983c1c95fc6 (diff)
media: iris: implement vb2 streaming ops
During the stream on operation, send HFI_CMD_START on the capture and output planes to start processing on the respective planes. During the stream off operation, send HFI_CMD_STOP to the firmware, which is a synchronous command. After the response is received by the firmware, the session is closed on the firmware. Introduce different states for the instance and state transitions. 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 |<-----------+ ----------. Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Tested-by: Stefan Schmidt <stefan.schmidt@linaro.org> # x1e80100 (Dell XPS 13 9345) Reviewed-by: Stefan Schmidt <stefan.schmidt@linaro.org> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-HDK Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'drivers/media/platform/qcom/iris/iris_instance.h')
-rw-r--r--drivers/media/platform/qcom/iris/iris_instance.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/platform/qcom/iris/iris_instance.h b/drivers/media/platform/qcom/iris/iris_instance.h
index 9f1a1e5ba7c7..6b88daf31011 100644
--- a/drivers/media/platform/qcom/iris/iris_instance.h
+++ b/drivers/media/platform/qcom/iris/iris_instance.h
@@ -26,9 +26,11 @@
* @ctrl_handler: reference of v4l2 ctrl handler
* @crop: structure of crop info
* @completion: structure of signal completions
+ * @flush_completion: structure of signal completions for flush cmd
* @fw_caps: array of supported instance firmware capabilities
* @buffers: array of different iris buffers
* @fw_min_count: minimnum count of buffers needed by fw
+ * @state: instance state
* @once_per_session_set: boolean to set once per session property
* @m2m_dev: a reference to m2m device structure
* @m2m_ctx: a reference to m2m context structure
@@ -46,9 +48,11 @@ struct iris_inst {
struct v4l2_ctrl_handler ctrl_handler;
struct iris_hfi_rect_desc crop;
struct completion completion;
+ struct completion flush_completion;
struct platform_inst_fw_cap fw_caps[INST_FW_CAP_MAX];
struct iris_buffers buffers[BUF_TYPE_MAX];
u32 fw_min_count;
+ enum iris_inst_state state;
bool once_per_session_set;
struct v4l2_m2m_dev *m2m_dev;
struct v4l2_m2m_ctx *m2m_ctx;