video: driver: request api changes for dynamic controls

- Request api allows to synchronize controls along
  with buffers.
- Client allocates a request fd. This request fd is
  associated with control and set using s_ext_ctrls.
  Such controls are stored by the framework and not
  applied immediately.
- Request fd is also associated with input qbuf and
  queued to driver. Following this actual request is
  queued. Buffers do not enter the queue untill the
  request is queued.
- As part of qbuf, driver call request_setup() which
  inturn sets the control to driver.

Change-Id: I316c4dc2a0091b21059230be5ee5fd6379259456
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
This commit is contained in:
Darshana Patil
2022-01-11 17:48:20 -08:00
parent 57c103b1ad
commit acc83ca211
16 changed files with 335 additions and 102 deletions

View File

@@ -86,9 +86,14 @@ enum msm_vidc_inst_state {
MSM_VIDC_ERROR = 12,
};
struct buf_queue {
struct vb2_queue *vb2q;
};
struct msm_vidc_inst {
struct list_head list;
struct mutex lock;
struct mutex request_lock;
enum msm_vidc_inst_state state;
enum msm_vidc_domain_type domain;
enum msm_vidc_codec_type codec;
@@ -101,6 +106,8 @@ struct msm_vidc_inst {
struct v4l2_format fmts[MAX_PORT];
struct v4l2_ctrl_handler ctrl_handler;
struct v4l2_fh event_handler;
struct v4l2_m2m_dev *m2m_dev;
struct v4l2_m2m_ctx *m2m_ctx;
struct v4l2_ctrl **ctrls;
u32 num_ctrls;
struct msm_vidc_inst_cap_entry children;
@@ -108,7 +115,7 @@ struct msm_vidc_inst {
enum hfi_rate_control hfi_rc_type;
enum hfi_layer_encoding_type hfi_layer_type;
bool request;
struct vb2_queue vb2q[MAX_PORT];
struct buf_queue bufq[MAX_PORT];
struct msm_vidc_rectangle crop;
struct msm_vidc_rectangle compose;
struct msm_vidc_power power;