summaryrefslogtreecommitdiffstats
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:49 +0530
committerHans Verkuil <hverkuil@xs4all.nl>2025-02-07 11:51:24 +0100
commit38fc8beaba55e06c8831f21a96ec5e33e2f1978f (patch)
treeecb6e30cf3721b484ef68ecf4f0f8a23a5c5998a /drivers/media/platform/qcom/iris/iris_instance.h
parentbb8a95aa038e099f5ec82c466e996b006e05abd7 (diff)
downloadlinux-38fc8beaba55e06c8831f21a96ec5e33e2f1978f.tar.gz
linux-38fc8beaba55e06c8831f21a96ec5e33e2f1978f.tar.bz2
linux-38fc8beaba55e06c8831f21a96ec5e33e2f1978f.zip
media: iris: implement reqbuf ioctl with vb2_queue_setup
Implement the reqbuf IOCTL op and the vb2_queue_setup vb2 op in the driver with necessary hooks. 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.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/media/platform/qcom/iris/iris_instance.h b/drivers/media/platform/qcom/iris/iris_instance.h
index 527a270f12d4..b9c7dcfb20f7 100644
--- a/drivers/media/platform/qcom/iris/iris_instance.h
+++ b/drivers/media/platform/qcom/iris/iris_instance.h
@@ -6,24 +6,46 @@
#ifndef __IRIS_INSTANCE_H__
#define __IRIS_INSTANCE_H__
+#include <media/v4l2-ctrls.h>
+
+#include "iris_buffer.h"
#include "iris_core.h"
+#include "iris_utils.h"
/**
* struct iris_inst - holds per video instance parameters
*
+ * @list: used for attach an instance to the core
* @core: pointer to core structure
+ * @session_id: id of current video session
* @ctx_q_lock: lock to serialize queues related ioctls
* @lock: lock to seralise forward and reverse threads
* @fh: reference of v4l2 file handler
+ * @fmt_src: structure of v4l2_format for source
+ * @fmt_dst: structure of v4l2_format for destination
+ * @crop: structure of crop info
+ * @completion: structure of signal completions
+ * @buffers: array of different iris buffers
+ * @fw_min_count: minimnum count of buffers needed by fw
+ * @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
*/
struct iris_inst {
+ struct list_head list;
struct iris_core *core;
+ u32 session_id;
struct mutex ctx_q_lock;/* lock to serialize queues related ioctls */
struct mutex lock; /* lock to serialize forward and reverse threads */
struct v4l2_fh fh;
+ struct v4l2_format *fmt_src;
+ struct v4l2_format *fmt_dst;
+ struct iris_hfi_rect_desc crop;
+ struct completion completion;
+ struct iris_buffers buffers[BUF_TYPE_MAX];
+ u32 fw_min_count;
+ bool once_per_session_set;
struct v4l2_m2m_dev *m2m_dev;
struct v4l2_m2m_ctx *m2m_ctx;
};