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

Commit 46ec63ca authored by Praneeth Paladugu's avatar Praneeth Paladugu
Browse files

msm: vidc: Update buffer couting logic for PMS



Today, driver counts the buffers with the client based on vb state
and bytesused. This logic also accouting the buffers which were
never queued to driver. By doing this, driver wrongly adjusting PMS.
Fix the mismatch by using DECODEONLY_FLAG.

CRs-Fixed: 2142478
Change-Id: I9802102de44f7668d1c4d11f8636348695acea47
Signed-off-by: default avatarPraneeth Paladugu <ppaladug@codeaurora.org>
parent fc9ce0e0
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -304,11 +304,18 @@ static inline int get_bufs_outside_fw(struct msm_vidc_inst *inst)
		 */

		if (inst->session_type == MSM_VIDC_DECODER) {
			struct vb2_v4l2_buffer *vbuf = NULL;

			q = &inst->bufq[CAPTURE_PORT].vb2_bufq;
			for (i = 0; i < q->num_buffers; i++) {
				vb = q->bufs[i];
				if (vb && vb->state != VB2_BUF_STATE_ACTIVE &&
						vb->planes[0].bytesused)
				if (!vb)
					continue;
				vbuf = to_vb2_v4l2_buffer(vb);
				if (vbuf &&
					vb->state != VB2_BUF_STATE_ACTIVE &&
					!(vbuf->flags &
						V4L2_QCOM_BUF_FLAG_DECODEONLY))
					fw_out_qsize++;
			}
		} else {