Quellcode durchsuchen

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

qctecmdr vor 4 Jahren
Ursprung
Commit
0f7360ca0a
1 geänderte Dateien mit 10 neuen und 8 gelöschten Zeilen
  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;
 		}