video: driver: use standard EOS event

use standard EOS event instead of private
last flag event.

Change-Id: Iaeb2c57ceb80769de8cf94a63077eddf3710f871
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
This commit is contained in:
Darshana Patil
2022-08-12 14:04:48 -07:00
committed by Gerrit - the friendly Code Review server
parent 203f09ac3f
commit 0b49e4ea40
4 changed files with 3 additions and 22 deletions

View File

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

View File

@@ -2203,7 +2203,6 @@ int msm_vidc_process_drain_last_flag(struct msm_vidc_inst *inst)
{
int rc = 0;
struct v4l2_event event = {0};
struct v4l2_event_vidc_last_flag *event_data = NULL;
if (!inst || !inst->capabilities) {
d_vpr_e("%s: invalid params\n", __func__);
@@ -2220,9 +2219,7 @@ int msm_vidc_process_drain_last_flag(struct msm_vidc_inst *inst)
return 0;
}
event.type = V4L2_EVENT_VIDC_LAST_FLAG;
event_data = (struct v4l2_event_vidc_last_flag *)event.u.data;
event_data->flag_type = LAST_FLAG_DRAIN;
event.type = V4L2_EVENT_EOS;
v4l2_event_queue_fh(&inst->event_handler, &event);
return rc;
@@ -2232,7 +2229,6 @@ int msm_vidc_process_psc_last_flag(struct msm_vidc_inst *inst)
{
int rc = 0;
struct v4l2_event event = {0};
struct v4l2_event_vidc_last_flag *event_data = NULL;
if (!inst || !inst->capabilities) {
d_vpr_e("%s: invalid params\n", __func__);
@@ -2249,9 +2245,7 @@ int msm_vidc_process_psc_last_flag(struct msm_vidc_inst *inst)
return 0;
}
event.type = V4L2_EVENT_VIDC_LAST_FLAG;
event_data = (struct v4l2_event_vidc_last_flag *)event.u.data;
event_data->flag_type = LAST_FLAG_DRC;
event.type = V4L2_EVENT_EOS;
v4l2_event_queue_fh(&inst->event_handler, &event);
return rc;

View File

@@ -640,7 +640,7 @@ static int get_driver_buffer_flags(struct msm_vidc_inst *inst, u32 hfi_flags)
* attach last flag to the buffer for encode session.
* For decode session attach only if control(LAST_FLAG_EVENT_ENABLE)
* is not set by client. If this control is enabled, last flag
* info will be sent via event(V4L2_EVENT_VIDC_LAST_FLAG) to client.
* info will be sent via event(V4L2_EVENT_EOS) to client.
*/
if ((is_encode_session(inst) &&
(hfi_flags & HFI_BUF_FW_FLAG_LAST)) ||