소스 검색

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