Browse Source

Merge "video: driver: update buffer counts during codec change"

qctecmdr 4 năm trước cách đây
mục cha
commit
f148f64858
2 tập tin đã thay đổi với 16 bổ sung0 xóa
  1. 8 0
      driver/vidc/src/msm_vdec.c
  2. 8 0
      driver/vidc/src/msm_venc.c

+ 8 - 0
driver/vidc/src/msm_vdec.c

@@ -107,6 +107,14 @@ static int msm_vdec_codec_change(struct msm_vidc_inst *inst, u32 v4l2_codec)
 	if(rc)
 		goto exit;
 
+	rc = msm_vidc_update_buffer_count(inst, INPUT_PORT);
+	if (rc)
+		return rc;
+
+	rc = msm_vidc_update_buffer_count(inst, OUTPUT_PORT);
+	if (rc)
+		return rc;
+
 exit:
 	return rc;
 }

+ 8 - 0
driver/vidc/src/msm_venc.c

@@ -88,6 +88,14 @@ static int msm_venc_codec_change(struct msm_vidc_inst *inst, u32 v4l2_codec)
 	if (rc)
 		goto exit;
 
+	rc = msm_vidc_update_buffer_count(inst, INPUT_PORT);
+	if (rc)
+		return rc;
+
+	rc = msm_vidc_update_buffer_count(inst, OUTPUT_PORT);
+	if (rc)
+		return rc;
+
 exit:
 	return rc;
 }