Эх сурвалжийг харах

video: driver: allow output settings in DRAIN_START_INPUT state

Allow output settings (reqest buffers, set format etc) in
MSM_VIDC_DRAIN_START_INPUT state because output port is
streamed off already.

Change-Id: Ia00451a4cc85f3fe05820721235661bfe2d3de04
Signed-off-by: Maheshwar Ajja <[email protected]>
Maheshwar Ajja 4 жил өмнө
parent
commit
ab6b763fea

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

@@ -811,14 +811,15 @@ bool msm_vidc_allow_s_fmt(struct msm_vidc_inst *inst, u32 type)
 		allow = true;
 		goto exit;
 	}
-	if (inst->state == MSM_VIDC_START_INPUT) {
-		if (type == OUTPUT_MPLANE || type == OUTPUT_META_PLANE) {
+	if (type == OUTPUT_MPLANE || type == OUTPUT_META_PLANE) {
+		if (inst->state == MSM_VIDC_START_INPUT ||
+		    inst->state == MSM_VIDC_DRAIN_START_INPUT) {
 			allow = true;
 			goto exit;
 		}
 	}
-	if (inst->state == MSM_VIDC_START_OUTPUT) {
-		if (type == INPUT_MPLANE || type == INPUT_META_PLANE) {
+	if (type == INPUT_MPLANE || type == INPUT_META_PLANE) {
+		if (inst->state == MSM_VIDC_START_OUTPUT) {
 			allow = true;
 			goto exit;
 		}
@@ -909,14 +910,15 @@ bool msm_vidc_allow_reqbufs(struct msm_vidc_inst *inst, u32 type)
 		allow = true;
 		goto exit;
 	}
-	if (inst->state == MSM_VIDC_START_INPUT) {
-		if (type == OUTPUT_MPLANE || type == OUTPUT_META_PLANE) {
+	if (type == OUTPUT_MPLANE || type == OUTPUT_META_PLANE) {
+		if (inst->state == MSM_VIDC_START_INPUT ||
+		    inst->state == MSM_VIDC_DRAIN_START_INPUT) {
 			allow = true;
 			goto exit;
 		}
 	}
-	if (inst->state == MSM_VIDC_START_OUTPUT) {
-		if (type == INPUT_MPLANE || type == INPUT_META_PLANE) {
+	if (type == INPUT_MPLANE || type == INPUT_META_PLANE) {
+		if (inst->state == MSM_VIDC_START_OUTPUT) {
 			allow = true;
 			goto exit;
 		}