瀏覽代碼

video: driver: handle drain in open state

Currently driver doesn't support CMD_STOP in open state.
But according to v4l2 std, the call to VIDIOC_DECODER/ENCODER_CMD()
should not fail even if any of the queues is not streaming,
but at the same time it will not initiate the Drain sequence.
So with this fix, not rejecting  CMD_STOP in open state but
at the same time not initiating drain sequence.

Fixes: v4l2-compliance :
		VIDIOC_(TRY_)DECODER_CMD on decoder.
		VIDIOC_(TRY_)ENCODER_CMD on encoder.

Change-Id: Ie94288cca88009a8a945bd7bca70d04239a4678c
Signed-off-by: Dikshita Agarwal <[email protected]>
Dikshita Agarwal 3 年之前
父節點
當前提交
a939a0621e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      driver/vidc/src/msm_vidc_driver.c

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

@@ -1472,7 +1472,8 @@ enum msm_vidc_allow msm_vidc_allow_stop(struct msm_vidc_inst *inst)
 		inst->state == MSM_VIDC_DRC_LAST_FLAG ||
 		inst->state == MSM_VIDC_DRC_DRAIN) {
 		allow = MSM_VIDC_ALLOW;
-	} else if (inst->state == MSM_VIDC_START_INPUT) {
+	} else if (inst->state == MSM_VIDC_START_INPUT ||
+		   inst->state == MSM_VIDC_OPEN) {
 		allow = MSM_VIDC_IGNORE;
 		i_vpr_e(inst, "%s: stop ignored in state %s\n",
 			__func__, state_name(inst->state));