Kaynağa Gözat

video: driver: use standard EOS event

use standard EOS event instead of private
last flag event.

Change-Id: Iaeb2c57ceb80769de8cf94a63077eddf3710f871
Signed-off-by: Darshana Patil <[email protected]>
Darshana Patil 2 yıl önce
ebeveyn
işleme
0b49e4ea40

+ 0 - 1
driver/vidc/src/msm_vdec.c

@@ -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:

+ 2 - 8
driver/vidc/src/msm_vidc_driver.c

@@ -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;

+ 1 - 1
driver/vidc/src/venus_hfi_response.c

@@ -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)) ||

+ 0 - 12
include/uapi/vidc/media/v4l2_vidc_extensions.h

@@ -473,18 +473,6 @@ struct v4l2_event_vidc_metadata {
 	__u8                                 reserved[44];
 };
 
-#define V4L2_EVENT_VIDC_LAST_FLAG                                             \
-	(V4L2_EVENT_PRIVATE_START + 0x2)
-
-enum v4l2_event_last_flag {
-	LAST_FLAG_DRC         = (1 << 0),
-	LAST_FLAG_DRAIN       = (1 << 1),
-};
-
-struct v4l2_event_vidc_last_flag {
-	enum v4l2_event_last_flag flag_type;
-};
-
 /* vendor events end */
 
 /* Default metadata size (align to 4KB) */