瀏覽代碼

video: driver: update buffer counts during codec change

At the time of codec change, only properties related to that
particular port gets updated. So other port is still referring
default values from previous codec type, which is not correct.
So added change to properly update buffer count during codec
change.

Change-Id: I320a0916cbf48f06448a959b07e13b74ebb0fd1c
Signed-off-by: Govindaraj Rajagopal <[email protected]>
Govindaraj Rajagopal 4 年之前
父節點
當前提交
5cf62d3aa0
共有 2 個文件被更改,包括 16 次插入0 次删除
  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;
 }