Explorar el Código

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 hace 4 años
padre
commit
5cf62d3aa0
Se han modificado 2 ficheros con 16 adiciones y 0 borrados
  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;
 }