video: driver: remove support for V4L2_EVENT_VIDC_METADATA

remove support for V4L2_EVENT_VIDC_METADATA as it is not
being used.

Change-Id: Ia375d0410d144d2e3b9cd78bc0fde16cfa0d0884
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
This commit is contained in:
Dikshita Agarwal
2022-08-02 13:01:18 +05:30
committed by Darshana Patil
parent 0b49e4ea40
commit 90fabfb02b
5 changed files with 5 additions and 67 deletions

View File

@@ -407,7 +407,7 @@ int msm_vidc_alloc_and_queue_session_internal_buffers(struct msm_vidc_inst *inst
enum msm_vidc_buffer_type buffer_type); enum msm_vidc_buffer_type buffer_type);
int msm_vidc_release_internal_buffers(struct msm_vidc_inst *inst, int msm_vidc_release_internal_buffers(struct msm_vidc_inst *inst,
enum msm_vidc_buffer_type buffer_type); enum msm_vidc_buffer_type buffer_type);
int msm_vidc_buffer_done(struct msm_vidc_inst *inst, int msm_vidc_vb2_buffer_done(struct msm_vidc_inst *inst,
struct msm_vidc_buffer *buf); struct msm_vidc_buffer *buf);
int msm_vidc_remove_session(struct msm_vidc_inst *inst); int msm_vidc_remove_session(struct msm_vidc_inst *inst);
int msm_vidc_add_session(struct msm_vidc_inst *inst); int msm_vidc_add_session(struct msm_vidc_inst *inst);

View File

@@ -2599,7 +2599,6 @@ int msm_vdec_subscribe_event(struct msm_vidc_inst *inst,
switch (sub->type) { switch (sub->type) {
case V4L2_EVENT_EOS: case V4L2_EVENT_EOS:
case V4L2_EVENT_VIDC_METADATA:
rc = v4l2_event_subscribe(&inst->event_handler, sub, MAX_EVENTS, NULL); rc = v4l2_event_subscribe(&inst->event_handler, sub, MAX_EVENTS, NULL);
break; break;
case V4L2_EVENT_SOURCE_CHANGE: case V4L2_EVENT_SOURCE_CHANGE:

View File

@@ -4110,7 +4110,7 @@ int msm_vidc_release_internal_buffers(struct msm_vidc_inst *inst,
return 0; return 0;
} }
static int msm_vidc_vb2_buffer_done(struct msm_vidc_inst *inst, int msm_vidc_vb2_buffer_done(struct msm_vidc_inst *inst,
struct msm_vidc_buffer *buf) struct msm_vidc_buffer *buf)
{ {
int type, port, state; int type, port, state;
@@ -4177,56 +4177,6 @@ static int msm_vidc_vb2_buffer_done(struct msm_vidc_inst *inst,
return 0; return 0;
} }
static int msm_vidc_v4l2_buffer_event(struct msm_vidc_inst *inst,
struct msm_vidc_buffer *buf)
{
int rc = 0;
struct v4l2_event event = {0};
struct v4l2_event_vidc_metadata *event_data = NULL;
if (!inst || !buf) {
d_vpr_e("%s: invalid params\n", __func__);
return -EINVAL;
}
if (buf->type != MSM_VIDC_BUF_INPUT_META) {
i_vpr_e(inst, "%s: unsupported buffer type %s\n",
__func__, buf_name(buf->type));
return -EINVAL;
}
event.type = V4L2_EVENT_VIDC_METADATA;
event_data = (struct v4l2_event_vidc_metadata *)event.u.data;
event_data->type = INPUT_META_PLANE;
event_data->fd = buf->fd;
event_data->index = buf->index;
event_data->bytesused = buf->data_size;
event_data->offset = buf->data_offset;
v4l2_event_queue_fh(&inst->event_handler, &event);
return rc;
}
int msm_vidc_buffer_done(struct msm_vidc_inst *inst,
struct msm_vidc_buffer *buf)
{
if (!inst || !inst->capabilities || !buf) {
d_vpr_e("%s: invalid params\n", __func__);
return -EINVAL;
}
if (buf->type == MSM_VIDC_BUF_INPUT_META &&
inst->capabilities->cap[INPUT_META_VIA_REQUEST].value) {
if (is_meta_rx_inp_enabled(inst, META_OUTBUF_FENCE))
return msm_vidc_v4l2_buffer_event(inst, buf);
} else {
return msm_vidc_vb2_buffer_done(inst, buf);
}
return 0;
}
int msm_vidc_event_queue_init(struct msm_vidc_inst *inst) int msm_vidc_event_queue_init(struct msm_vidc_inst *inst)
{ {
int rc = 0; int rc = 0;
@@ -5612,7 +5562,7 @@ int msm_vidc_flush_buffers(struct msm_vidc_inst *inst,
buf->attr & MSM_VIDC_ATTR_DEFERRED) { buf->attr & MSM_VIDC_ATTR_DEFERRED) {
print_vidc_buffer(VIDC_HIGH, "high", "flushing buffer", inst, buf); print_vidc_buffer(VIDC_HIGH, "high", "flushing buffer", inst, buf);
if (!(buf->attr & MSM_VIDC_ATTR_BUFFER_DONE)) if (!(buf->attr & MSM_VIDC_ATTR_BUFFER_DONE))
msm_vidc_buffer_done(inst, buf); msm_vidc_vb2_buffer_done(inst, buf);
msm_vidc_put_driver_buf(inst, buf); msm_vidc_put_driver_buf(inst, buf);
} }
} }
@@ -5757,7 +5707,7 @@ void msm_vidc_destroy_buffers(struct msm_vidc_inst *inst)
list_for_each_entry_safe(buf, dummy, &buffers->list, list) { list_for_each_entry_safe(buf, dummy, &buffers->list, list) {
print_vidc_buffer(VIDC_ERR, "err ", "destroying ", inst, buf); print_vidc_buffer(VIDC_ERR, "err ", "destroying ", inst, buf);
if (!(buf->attr & MSM_VIDC_ATTR_BUFFER_DONE)) if (!(buf->attr & MSM_VIDC_ATTR_BUFFER_DONE))
msm_vidc_buffer_done(inst, buf); msm_vidc_vb2_buffer_done(inst, buf);
msm_vidc_put_driver_buf(inst, buf); msm_vidc_put_driver_buf(inst, buf);
} }
msm_vidc_unmap_buffers(inst, ext_buf_types[i]); msm_vidc_unmap_buffers(inst, ext_buf_types[i]);

View File

@@ -1251,7 +1251,7 @@ static int handle_dequeue_buffers(struct msm_vidc_inst *inst)
"vb2 done already", inst, buf); "vb2 done already", inst, buf);
} else { } else {
buf->attr |= MSM_VIDC_ATTR_BUFFER_DONE; buf->attr |= MSM_VIDC_ATTR_BUFFER_DONE;
rc = msm_vidc_buffer_done(inst, buf); rc = msm_vidc_vb2_buffer_done(inst, buf);
if (rc) { if (rc) {
print_vidc_buffer(VIDC_HIGH, "err ", print_vidc_buffer(VIDC_HIGH, "err ",
"vb2 done failed", inst, buf); "vb2 done failed", inst, buf);

View File

@@ -461,17 +461,6 @@ enum meta_picture_type {
* ... * ...
* } * }
*/ */
#define V4L2_EVENT_VIDC_METADATA \
(V4L2_EVENT_PRIVATE_START + 0x1)
struct v4l2_event_vidc_metadata {
__u32 type;
__s32 fd;
__u32 index;
__u32 bytesused;
__u32 offset;
__u8 reserved[44];
};
/* vendor events end */ /* vendor events end */