From 7c4952934b364e01c44a5f14ea20ee66cabc9d47 Mon Sep 17 00:00:00 2001 From: Darshana Patil Date: Thu, 27 Jan 2022 12:00:57 -0800 Subject: [PATCH 1/2] video: driver: packetize dynamic controls with buffer packetize dynamic controls set via request api along with corresponding input buffer under the same hfi header and queue to FW. Change-Id: I8bf82f7ccb1ab16c42ce02189a208f5f7cb8dc70 Signed-off-by: Darshana Patil --- driver/vidc/inc/msm_vidc_inst.h | 1 + driver/vidc/inc/msm_vidc_memory.h | 3 + driver/vidc/inc/venus_hfi.h | 5 ++ driver/vidc/src/msm_vidc.c | 1 + driver/vidc/src/msm_vidc_control.c | 8 --- driver/vidc/src/msm_vidc_memory.c | 3 + driver/vidc/src/venus_hfi.c | 89 ++++++++++++++++++++++++++++++ 7 files changed, 102 insertions(+), 8 deletions(-) diff --git a/driver/vidc/inc/msm_vidc_inst.h b/driver/vidc/inc/msm_vidc_inst.h index d1841a9a56..c3acb30354 100644 --- a/driver/vidc/inc/msm_vidc_inst.h +++ b/driver/vidc/inc/msm_vidc_inst.h @@ -144,6 +144,7 @@ struct msm_vidc_inst { struct list_head caps_list; struct list_head children_list; struct list_head firmware_list; + struct list_head pending_pkts; /* list of struct hfi_pending_packet */ bool once_per_session_set; bool ipsc_properties_set; bool opsc_properties_set; diff --git a/driver/vidc/inc/msm_vidc_memory.h b/driver/vidc/inc/msm_vidc_memory.h index 1226205875..69c4acf3c8 100644 --- a/driver/vidc/inc/msm_vidc_memory.h +++ b/driver/vidc/inc/msm_vidc_memory.h @@ -11,6 +11,8 @@ struct msm_vidc_core; struct msm_vidc_inst; +#define MSM_MEM_POOL_PACKET_SIZE 1024 + struct msm_memory_dmabuf { struct list_head list; struct dma_buf *dmabuf; @@ -23,6 +25,7 @@ enum msm_memory_pool_type { MSM_MEM_POOL_ALLOC, MSM_MEM_POOL_TIMESTAMP, MSM_MEM_POOL_DMABUF, + MSM_MEM_POOL_PACKET, MSM_MEM_POOL_MAX, }; diff --git a/driver/vidc/inc/venus_hfi.h b/driver/vidc/inc/venus_hfi.h index 48c9a85235..129b66280a 100644 --- a/driver/vidc/inc/venus_hfi.h +++ b/driver/vidc/inc/venus_hfi.h @@ -28,6 +28,11 @@ struct vidc_buffer_addr_info { u32 response_required; }; +struct hfi_pending_packet { + struct list_head list; + void *data; +}; + int venus_hfi_session_property(struct msm_vidc_inst *inst, u32 pkt_type, u32 flags, u32 port, u32 payload_type, void *payload, u32 payload_size); diff --git a/driver/vidc/src/msm_vidc.c b/driver/vidc/src/msm_vidc.c index 3d09ab5a86..5c4f632195 100644 --- a/driver/vidc/src/msm_vidc.c +++ b/driver/vidc/src/msm_vidc.c @@ -945,6 +945,7 @@ void *msm_vidc_open(void *vidc_core, u32 session_type) INIT_LIST_HEAD(&inst->firmware_list); INIT_LIST_HEAD(&inst->enc_input_crs); INIT_LIST_HEAD(&inst->dmabuf_tracker); + INIT_LIST_HEAD(&inst->pending_pkts); for (i = 0; i < MAX_SIGNAL; i++) init_completion(&inst->completions[i]); diff --git a/driver/vidc/src/msm_vidc_control.c b/driver/vidc/src/msm_vidc_control.c index 18a3706005..175a547fc9 100644 --- a/driver/vidc/src/msm_vidc_control.c +++ b/driver/vidc/src/msm_vidc_control.c @@ -945,14 +945,6 @@ int msm_v4l2_op_s_ctrl(struct v4l2_ctrl *ctrl) kfree(curr_node); } - /* dynamic controls with request will be set along with qbuf */ - if (inst->request) { - i_vpr_l(inst, - "%s: request api enabled, dynamic ctrls to be set with qbuf\n", - __func__); - return 0; - } - /* Dynamic set control ASAP */ rc = msm_vidc_set_v4l2_properties(inst); if (rc) { diff --git a/driver/vidc/src/msm_vidc_memory.c b/driver/vidc/src/msm_vidc_memory.c index 8e54aa8b57..9cf1ff5bf2 100644 --- a/driver/vidc/src/msm_vidc_memory.c +++ b/driver/vidc/src/msm_vidc_memory.c @@ -17,6 +17,7 @@ #include "msm_vidc_dt.h" #include "msm_vidc_core.h" #include "msm_vidc_events.h" +#include "venus_hfi.h" struct msm_vidc_buf_region_name { enum msm_vidc_buffer_region region; @@ -589,6 +590,8 @@ static struct msm_vidc_type_size_name buftype_size_name_arr[] = { {MSM_MEM_POOL_ALLOC, sizeof(struct msm_vidc_alloc), "MSM_MEM_POOL_ALLOC" }, {MSM_MEM_POOL_TIMESTAMP, sizeof(struct msm_vidc_timestamp), "MSM_MEM_POOL_TIMESTAMP" }, {MSM_MEM_POOL_DMABUF, sizeof(struct msm_memory_dmabuf), "MSM_MEM_POOL_DMABUF" }, + {MSM_MEM_POOL_PACKET, sizeof(struct hfi_pending_packet) + MSM_MEM_POOL_PACKET_SIZE, + "MSM_MEM_POOL_PACKET"}, }; int msm_memory_pools_init(struct msm_vidc_inst *inst) diff --git a/driver/vidc/src/venus_hfi.c b/driver/vidc/src/venus_hfi.c index 2b1d9fc59d..ed4960d460 100644 --- a/driver/vidc/src/venus_hfi.c +++ b/driver/vidc/src/venus_hfi.c @@ -3047,6 +3047,43 @@ unlock: return rc; } +static int venus_hfi_cache_packet(struct msm_vidc_inst *inst) +{ + int rc = 0; + struct hfi_header *hdr; + struct hfi_pending_packet *packet; + + if (!inst->packet) { + d_vpr_e("%s: invalid params\n", __func__); + return -EINVAL; + } + + hdr = (struct hfi_header *)inst->packet; + if (hdr->size < sizeof(struct hfi_header)) { + d_vpr_e("%s: invalid hdr size %d\n", __func__, hdr->size); + return -EINVAL; + } + + packet = msm_memory_pool_alloc(inst, MSM_MEM_POOL_PACKET); + if (!packet) { + i_vpr_e(inst, "%s: failed to allocate pending packet\n", __func__); + return -ENOMEM; + } + + INIT_LIST_HEAD(&packet->list); + list_add_tail(&packet->list, &inst->pending_pkts); + packet->data = (u8 *)packet + sizeof(struct hfi_pending_packet); + + if (hdr->size > MSM_MEM_POOL_PACKET_SIZE) { + i_vpr_e(inst, "%s: header size %d exceeds pool packet size %d\n", + __func__, hdr->size, MSM_MEM_POOL_PACKET_SIZE); + return -EINVAL; + } + memcpy(packet->data, inst->packet, hdr->size); + + return rc; +} + int venus_hfi_session_property(struct msm_vidc_inst *inst, u32 pkt_type, u32 flags, u32 port, u32 payload_type, void *payload, u32 payload_size) @@ -3081,6 +3118,12 @@ int venus_hfi_session_property(struct msm_vidc_inst *inst, if (rc) goto unlock; + /* skip sending packet to firmware */ + if (inst->request) { + rc = venus_hfi_cache_packet(inst); + goto unlock; + } + rc = __iface_cmdq_write(inst->core, inst->packet); if (rc) goto unlock; @@ -3381,6 +3424,48 @@ unlock: return rc; } +static int venus_hfi_add_pending_packets(struct msm_vidc_inst *inst) +{ + int rc = 0; + int num_packets = 0; + struct hfi_pending_packet *pkt_info, *dummy; + struct hfi_header *hdr, *src_hdr; + struct hfi_packet *src_pkt; + + if (!inst || !inst->packet) { + d_vpr_e("%s: invalid params\n", __func__); + return -EINVAL; + } + + hdr = (struct hfi_header *)inst->packet; + if (hdr->size < sizeof(struct hfi_header)) { + i_vpr_e(inst, "%s: invalid hdr size %d\n", + __func__, hdr->size); + return -EINVAL; + } + + list_for_each_entry_safe(pkt_info, dummy, &inst->pending_pkts, list) { + src_hdr = (struct hfi_header *)(pkt_info->data); + num_packets = src_hdr->num_packets; + src_pkt = (struct hfi_packet *)((u8 *)src_hdr + sizeof(struct hfi_header)); + while (num_packets > 0) { + memcpy((u8 *)hdr + hdr->size, (void *)src_pkt, src_pkt->size); + hdr->num_packets++; + hdr->size += src_pkt->size; + num_packets--; + src_pkt = (struct hfi_packet *)((u8 *)src_pkt + src_pkt->size); + if ((u8 *)src_pkt < (u8 *)src_hdr || + (u8 *)src_pkt > (u8 *)src_hdr + hdr->size) { + i_vpr_e(inst, "%s: invalid packet address\n", __func__); + return -EINVAL; + } + } + list_del(&pkt_info->list); + msm_memory_pool_free(inst, pkt_info); + } + return rc; +} + int venus_hfi_queue_buffer(struct msm_vidc_inst *inst, struct msm_vidc_buffer *buffer, struct msm_vidc_buffer *metabuf) { @@ -3438,6 +3523,10 @@ int venus_hfi_queue_buffer(struct msm_vidc_inst *inst, goto unlock; } + rc = venus_hfi_add_pending_packets(inst); + if (rc) + goto unlock; + rc = __iface_cmdq_write(inst->core, inst->packet); if (rc) goto unlock; From 9978dc376e19c10e7aa4c835a3c2cf485b59ad76 Mon Sep 17 00:00:00 2001 From: Darshana Patil Date: Mon, 31 Jan 2022 10:02:43 -0800 Subject: [PATCH 2/2] video: driver: add support to send input meta buffer via request Client can enable V4L2_CID_MPEG_VIDC_INPUT_METADATA_VIA_REQUEST_ENABLE control and send input metadata buffer via request. Change-Id: Icccdada8253d1d0291c01e2e539968141f7ddd2c Signed-off-by: Darshana Patil --- driver/platform/kalama/src/msm_vidc_kalama.c | 9 ++ driver/vidc/inc/msm_vidc_driver.h | 2 + driver/vidc/inc/msm_vidc_internal.h | 1 + driver/vidc/src/msm_vdec.c | 18 ++- driver/vidc/src/msm_venc.c | 18 ++- driver/vidc/src/msm_vidc_control.c | 11 ++ driver/vidc/src/msm_vidc_driver.c | 103 +++++++++++++++++- driver/vidc/src/msm_vidc_vb2.c | 32 ++++-- .../uapi/vidc/media/v4l2_vidc_extensions.h | 3 + 9 files changed, 176 insertions(+), 21 deletions(-) diff --git a/driver/platform/kalama/src/msm_vidc_kalama.c b/driver/platform/kalama/src/msm_vidc_kalama.c index 3661ea221a..419c32c67e 100644 --- a/driver/platform/kalama/src/msm_vidc_kalama.c +++ b/driver/platform/kalama/src/msm_vidc_kalama.c @@ -1519,6 +1519,15 @@ static struct msm_platform_inst_capability instance_data_kalama[] = { {0}, {0}, NULL, NULL}, + {INPUT_META_VIA_REQUEST, ENC|DEC, CODECS_ALL, + V4L2_MPEG_MSM_VIDC_DISABLE, V4L2_MPEG_MSM_VIDC_ENABLE, + 1, V4L2_MPEG_MSM_VIDC_DISABLE, + V4L2_CID_MPEG_VIDC_INPUT_METADATA_VIA_REQUEST_ENABLE, + 0, + CAP_FLAG_INPUT_PORT, + {0}, {0}, + NULL, NULL}, + {META_LTR_MARK_USE, ENC, H264|HEVC, V4L2_MPEG_MSM_VIDC_DISABLE, V4L2_MPEG_MSM_VIDC_ENABLE, 1, V4L2_MPEG_MSM_VIDC_DISABLE, diff --git a/driver/vidc/inc/msm_vidc_driver.h b/driver/vidc/inc/msm_vidc_driver.h index b44dd63416..3f80c8b066 100644 --- a/driver/vidc/inc/msm_vidc_driver.h +++ b/driver/vidc/inc/msm_vidc_driver.h @@ -452,5 +452,7 @@ bool res_is_less_than(u32 width, u32 height, bool res_is_less_than_or_equal_to(u32 width, u32 height, u32 ref_width, u32 ref_height); int msm_vidc_get_properties(struct msm_vidc_inst *inst); +int msm_vidc_create_input_metadata_buffer(struct msm_vidc_inst *inst, u32 buf_fd); +int msm_vidc_update_input_meta_buffer_index(struct msm_vidc_inst *inst, struct vb2_buffer *vb2); #endif // _MSM_VIDC_DRIVER_H_ diff --git a/driver/vidc/inc/msm_vidc_internal.h b/driver/vidc/inc/msm_vidc_internal.h index 31ac22d028..42b4dea299 100644 --- a/driver/vidc/inc/msm_vidc_internal.h +++ b/driver/vidc/inc/msm_vidc_internal.h @@ -433,6 +433,7 @@ enum msm_vidc_inst_capability_type { SUPER_BLOCK, DRAP, INPUT_METADATA_FD, + INPUT_META_VIA_REQUEST, META_BITSTREAM_RESOLUTION, META_CROP_OFFSETS, META_DPB_MISR, diff --git a/driver/vidc/src/msm_vdec.c b/driver/vidc/src/msm_vdec.c index 837f7bd96d..5c554a212e 100644 --- a/driver/vidc/src/msm_vdec.c +++ b/driver/vidc/src/msm_vdec.c @@ -1613,12 +1613,18 @@ int msm_vdec_streamon_input(struct msm_vidc_inst *inst) return -EINVAL; } - if (is_input_meta_enabled(inst) && - !inst->bufq[INPUT_META_PORT].vb2q->streaming) { - i_vpr_e(inst, - "%s: Meta port must be streamed on before data port\n", - __func__); - return -EINVAL; + /* + * do not check for input meta port streamon when + * request is enabled + */ + if (!inst->capabilities->cap[INPUT_META_VIA_REQUEST].value) { + if (is_input_meta_enabled(inst) && + !inst->bufq[INPUT_META_PORT].vb2q->streaming) { + i_vpr_e(inst, + "%s: Meta port must be streamed on before data port\n", + __func__); + return -EINVAL; + } } rc = msm_vidc_check_session_supported(inst); diff --git a/driver/vidc/src/msm_venc.c b/driver/vidc/src/msm_venc.c index 895da9d860..edd9e278fd 100644 --- a/driver/vidc/src/msm_venc.c +++ b/driver/vidc/src/msm_venc.c @@ -814,12 +814,18 @@ int msm_venc_streamon_input(struct msm_vidc_inst *inst) return -EINVAL; } - if (is_input_meta_enabled(inst) && - !inst->bufq[INPUT_META_PORT].vb2q->streaming) { - i_vpr_e(inst, - "%s: Meta port must be streamed on before data port\n", - __func__); - return -EINVAL; + /* + * do not check for input meta port streamon when + * request is enabled + */ + if (!inst->capabilities->cap[INPUT_META_VIA_REQUEST].value) { + if (is_input_meta_enabled(inst) && + !inst->bufq[INPUT_META_PORT].vb2q->streaming) { + i_vpr_e(inst, + "%s: Meta port must be streamed on before data port\n", + __func__); + return -EINVAL; + } } rc = msm_vidc_check_session_supported(inst); diff --git a/driver/vidc/src/msm_vidc_control.c b/driver/vidc/src/msm_vidc_control.c index 175a547fc9..cdc66ae768 100644 --- a/driver/vidc/src/msm_vidc_control.c +++ b/driver/vidc/src/msm_vidc_control.c @@ -854,6 +854,17 @@ int msm_v4l2_op_s_ctrl(struct v4l2_ctrl *ctrl) return -EINVAL; } + if (ctrl->id == V4L2_CID_MPEG_VIDC_INPUT_METADATA_FD) { + if (!capability->cap[INPUT_META_VIA_REQUEST].value) { + i_vpr_e(inst, + "%s: input metadata not enabled via request\n", __func__); + return -EINVAL; + } + rc = msm_vidc_create_input_metadata_buffer(inst, ctrl->val); + if (rc) + return rc; + } + capability->cap[cap_id].flags |= CAP_FLAG_CLIENT_SET; /* Static setting */ if (!inst->bufq[OUTPUT_PORT].vb2q->streaming) { diff --git a/driver/vidc/src/msm_vidc_driver.c b/driver/vidc/src/msm_vidc_driver.c index 9e96d4c329..97640c55e8 100644 --- a/driver/vidc/src/msm_vidc_driver.c +++ b/driver/vidc/src/msm_vidc_driver.c @@ -150,6 +150,7 @@ static const struct msm_vidc_cap_name cap_name_arr[] = { {SUPER_BLOCK, "SUPER_BLOCK" }, {DRAP, "DRAP" }, {INPUT_METADATA_FD, "INPUT_METADATA_FD" }, + {INPUT_META_VIA_REQUEST, "INPUT_META_VIA_REQUEST" }, {META_BITSTREAM_RESOLUTION, "META_BITSTREAM_RESOLUTION" }, {META_CROP_OFFSETS, "META_CROP_OFFSETS" }, {META_DPB_MISR, "META_DPB_MISR" }, @@ -1296,6 +1297,7 @@ bool msm_vidc_allow_s_ctrl(struct msm_vidc_inst *inst, u32 id) case V4L2_CID_MPEG_VIDC_CODEC_CONFIG: case V4L2_CID_MPEG_VIDC_PRIORITY: case V4L2_CID_MPEG_VIDC_LOWLATENCY_REQUEST: + case V4L2_CID_MPEG_VIDC_INPUT_METADATA_FD: allow = true; break; default: @@ -3633,7 +3635,7 @@ int msm_vidc_vb2_buffer_done(struct msm_vidc_inst *inst, struct vb2_v4l2_buffer *vbuf; bool found; - if (!inst || !buf) { + if (!inst || !inst->capabilities || !buf) { d_vpr_e("%s: invalid params\n", __func__); return -EINVAL; } @@ -3644,6 +3646,14 @@ int msm_vidc_vb2_buffer_done(struct msm_vidc_inst *inst, if (port < 0) return -EINVAL; + /* + * vb2_buffer_done not required if input metadata + * buffer sent via request api + */ + if (buf->type == MSM_VIDC_BUF_INPUT_META && + inst->capabilities->cap[INPUT_META_VIA_REQUEST].value) + return 0; + q = inst->bufq[port].vb2q; if (!q->streaming) { i_vpr_e(inst, "%s: port %d is not streaming\n", @@ -6138,3 +6148,94 @@ int msm_vidc_get_properties(struct msm_vidc_inst *inst) return 0; } + +int msm_vidc_create_input_metadata_buffer(struct msm_vidc_inst *inst, u32 fd) +{ + int rc = 0; + struct msm_vidc_buffer *buf = NULL; + struct msm_vidc_buffers *buffers; + struct dma_buf *dma_buf; + + if (!inst) { + d_vpr_e("%s: invalid params\n", __func__); + return -EINVAL; + } + + if (fd <= 0) { + i_vpr_e(inst, "%s: invalid input metadata buffer fd %d\n", + __func__, fd); + return -EINVAL; + } + + buffers = msm_vidc_get_buffers(inst, MSM_VIDC_BUF_INPUT_META, __func__); + if (!buffers) + return -EINVAL; + + buf = msm_memory_pool_alloc(inst, MSM_MEM_POOL_BUFFER); + if (!buf) { + i_vpr_e(inst, "%s: buffer pool alloc failed\n", __func__); + return -EINVAL; + } + + INIT_LIST_HEAD(&buf->list); + buf->type = MSM_VIDC_BUF_INPUT_META; + buf->index = INT_MAX; + buf->fd = fd; + dma_buf = msm_vidc_memory_get_dmabuf(inst, fd); + if (!dma_buf) { + rc = -ENOMEM; + goto error_dma_buf; + } + buf->dmabuf = dma_buf; + buf->data_size = dma_buf->size; + buf->buffer_size = dma_buf->size; + buf->attr |= MSM_VIDC_ATTR_DEFERRED; + + rc = msm_vidc_map_driver_buf(inst, buf); + if (rc) + goto error_map; + + list_add_tail(&buf->list, &buffers->list); + return rc; + +error_map: + msm_vidc_memory_put_dmabuf(inst, buf->dmabuf); +error_dma_buf: + msm_memory_pool_free(inst, buf); + return rc; +} + +int msm_vidc_update_input_meta_buffer_index(struct msm_vidc_inst *inst, + struct vb2_buffer *vb2) +{ + int rc = 0; + bool found = false; + struct msm_vidc_buffer *buf = NULL; + struct msm_vidc_buffers *buffers; + + if (!inst || !vb2) { + d_vpr_e("%s: invalid params\n", __func__); + return -EINVAL; + } + + if (vb2->type != INPUT_MPLANE) + return 0; + + buffers = msm_vidc_get_buffers(inst, MSM_VIDC_BUF_INPUT_META, __func__); + if (!buffers) + return -EINVAL; + list_for_each_entry(buf, &buffers->list, list) { + if (buf->index == INT_MAX) { + buf->index = vb2->index; + found = true; + break; + } + } + + if (!found) { + i_vpr_e(inst, "%s: missing input metabuffer for index %d\n", + __func__, vb2->index); + rc = -EINVAL; + } + return rc; +} \ No newline at end of file diff --git a/driver/vidc/src/msm_vidc_vb2.c b/driver/vidc/src/msm_vidc_vb2.c index 2184e302ef..496250f756 100644 --- a/driver/vidc/src/msm_vidc_vb2.c +++ b/driver/vidc/src/msm_vidc_vb2.c @@ -172,10 +172,19 @@ int msm_vidc_start_streaming(struct vb2_queue *q, unsigned int count) return -EINVAL; } inst = q->drv_priv; - if (!inst || !inst->core) { + if (!inst || !inst->core || !inst->capabilities) { d_vpr_e("%s: invalid params\n", __func__); return -EINVAL; } + + if (q->type == INPUT_META_PLANE && + inst->capabilities->cap[INPUT_META_VIA_REQUEST].value) { + i_vpr_e(inst, + "%s: invalid input meta port start when request enabled\n", + __func__); + return -EINVAL; + } + if (q->type == INPUT_META_PLANE || q->type == OUTPUT_META_PLANE) { i_vpr_h(inst, "%s: nothing to start on %s\n", __func__, v4l2_type_name(q->type)); @@ -364,13 +373,16 @@ void msm_vidc_buf_queue(struct vb2_buffer *vb2) inst->request = false; i_vpr_e(inst, "%s: request setup failed, error %d\n", __func__, rc); - msm_vidc_change_inst_state(inst, MSM_VIDC_ERROR, __func__); - v4l2_ctrl_request_complete(vb2->req_obj.req, &inst->ctrl_handler); - vb2_buffer_done(vb2, VB2_BUF_STATE_ERROR); - return; + goto error; } inst->request = false; + if (inst->capabilities->cap[INPUT_META_VIA_REQUEST].value) { + rc = msm_vidc_update_input_meta_buffer_index(inst, vb2); + if (rc) + goto error; + } + if (is_decode_session(inst)) rc = msm_vdec_qbuf(inst, vb2); else if (is_encode_session(inst)) @@ -380,10 +392,14 @@ void msm_vidc_buf_queue(struct vb2_buffer *vb2) if (rc) { print_vb2_buffer("failed vb2-qbuf", inst, vb2); - msm_vidc_change_inst_state(inst, MSM_VIDC_ERROR, __func__); - v4l2_ctrl_request_complete(vb2->req_obj.req, &inst->ctrl_handler); - vb2_buffer_done(vb2, VB2_BUF_STATE_ERROR); + goto error; } + return; + +error: + msm_vidc_change_inst_state(inst, MSM_VIDC_ERROR, __func__); + v4l2_ctrl_request_complete(vb2->req_obj.req, &inst->ctrl_handler); + vb2_buffer_done(vb2, VB2_BUF_STATE_ERROR); } void msm_vidc_buf_cleanup(struct vb2_buffer *vb) diff --git a/include/uapi/vidc/media/v4l2_vidc_extensions.h b/include/uapi/vidc/media/v4l2_vidc_extensions.h index 540ef12684..e8a4e5e6f0 100644 --- a/include/uapi/vidc/media/v4l2_vidc_extensions.h +++ b/include/uapi/vidc/media/v4l2_vidc_extensions.h @@ -197,6 +197,9 @@ enum v4l2_mpeg_video_av1_tier { /* Control to set input metadata buffer fd */ #define V4L2_CID_MPEG_VIDC_INPUT_METADATA_FD \ (V4L2_CID_MPEG_VIDC_BASE + 0x36) +/* Control to enable input metadata via request api */ +#define V4L2_CID_MPEG_VIDC_INPUT_METADATA_VIA_REQUEST_ENABLE \ + (V4L2_CID_MPEG_VIDC_BASE + 0x37) /* add new controls above this line */ /* Deprecate below controls once availble in gki and gsi bionic header */