Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c124d047 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Update input buffer counts in set format"

parents bcf2f85a c291cec2
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -651,6 +651,19 @@ int msm_vdec_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
		mplane->plane_fmt[0].sizeimage =
			msm_vidc_calculate_dec_input_frame_size(inst);

		/* Driver can recalculate buffer count only for
		 * only for bitstream port. Decoder YUV port reconfig
		 * should not overwrite the FW calculated buffer
		 * count.
		 */
		rc = msm_vidc_calculate_buffer_counts(inst);
		if (rc) {
			s_vpr_e(inst->sid,
				"%s failed to calculate buffer count\n",
				__func__);
			return rc;
		}

		rc = msm_vidc_check_session_supported(inst);
		if (rc) {
			s_vpr_e(inst->sid,
+8 −0
Original line number Diff line number Diff line
@@ -1384,6 +1384,14 @@ int msm_venc_s_fmt(struct msm_vidc_inst *inst, struct v4l2_format *f)
			inst->bit_depth = MSM_VIDC_BIT_DEPTH_10;
		}

		rc = msm_vidc_calculate_buffer_counts(inst);
		if (rc) {
			s_vpr_e(inst->sid,
				"%s failed to calculate buffer count\n",
				__func__);
			return rc;
		}

		rc = msm_vidc_check_session_supported(inst);
		if (rc) {
			s_vpr_e(inst->sid,