Pārlūkot izejas kodu

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

qctecmdr 4 gadi atpakaļ
vecāks
revīzija
0f7360ca0a
1 mainītis faili ar 10 papildinājumiem un 8 dzēšanām
  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;
 		}