Explorar o código

Merge "video: driver: allow output settings in DRAIN_START_INPUT state"

qctecmdr %!s(int64=4) %!d(string=hai) anos
pai
achega
0f7360ca0a
Modificáronse 1 ficheiros con 10 adicións e 8 borrados
  1. 10 8
      driver/vidc/src/msm_vidc_driver.c

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

@@ -813,14 +813,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;
 		}
@@ -911,14 +912,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;
 		}