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

Commit f7d96082 authored by Qiwei Liu's avatar Qiwei Liu
Browse files

msm: vidc: Fix incorrect fbd count issue



Currently fbd count will increase not only when firmware
report fbd, but also when some pending ftbs hold by driver
are flushed out. This causes fbd count larger than
actual value after seek/flush events, and will cause
DCVS got wrong fw_pending_bufs value and set lower
clock rate than expected.
Modify the place for fbd count++, only do this when handle
firmware reported fbds.

CRs-Fixed: 2086192
Change-Id: I9989fcf86d51873d99a51adf18079353070a2a3f
Signed-off-by: default avatarQiwei Liu <qiweil@codeaurora.org>
parent 1ded649b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2330,9 +2330,6 @@ int msm_comm_vb2_buffer_done(struct msm_vidc_inst *inst,
			__func__, vb->type);
		return -EINVAL;
	}
	msm_vidc_debugfs_update(inst, port == CAPTURE_PORT ?
			MSM_VIDC_DEBUGFS_EVENT_FBD :
			MSM_VIDC_DEBUGFS_EVENT_EBD);

	mutex_lock(&inst->bufq[port].lock);
	vb2_buffer_done(vb, VB2_BUF_STATE_DONE);
@@ -2458,6 +2455,7 @@ static void handle_ebd(enum hal_command_response cmd, void *data)
	 */
	msm_comm_put_vidc_buffer(inst, mbuf);
	msm_comm_vb2_buffer_done(inst, vb2);
	msm_vidc_debugfs_update(inst, MSM_VIDC_DEBUGFS_EVENT_EBD);
	kref_put_mbuf(mbuf);
exit:
	put_inst(inst);
@@ -2659,6 +2657,7 @@ static void handle_fbd(enum hal_command_response cmd, void *data)
	 */
	msm_comm_put_vidc_buffer(inst, mbuf);
	msm_comm_vb2_buffer_done(inst, vb2);
	msm_vidc_debugfs_update(inst, MSM_VIDC_DEBUGFS_EVENT_FBD);
	kref_put_mbuf(mbuf);

exit: