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

Commit ced03aff authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

drm/msm/sde: fix kickoff ref count for single phys encoder usecase



The pending_kickoff ref count is not updated properly
for single physical encoder usecase resulting in frame-done
triggered prematurely, causing various issues. Update the
ref count during kickoff so that the frame-done and fences
for the frame are handled properly.

Change-Id: I6d62b047905c27cd5f039b83e9d490378b603714
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent 4cec0cd6
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -3397,13 +3397,16 @@ static void _sde_encoder_kickoff_phys(struct sde_encoder_virt *sde_enc)
			set_bit(i, sde_enc->frame_busy_mask);

		if (!phys->ops.needs_single_flush ||
				!phys->ops.needs_single_flush(phys))
				!phys->ops.needs_single_flush(phys)) {
			pending_kickoff_cnt =
				sde_encoder_phys_inc_pending(phys);
			_sde_encoder_trigger_flush(&sde_enc->base, phys, 0x0);
		else if (ctl->ops.get_pending_flush) {
			SDE_EVT32(pending_kickoff_cnt, SDE_EVTLOG_FUNC_CASE1);
		} else if (ctl->ops.get_pending_flush) {
			pending_kickoff_cnt =
				sde_encoder_phys_inc_pending(phys);
			ctl->ops.get_pending_flush(ctl, &pending_flush);
			SDE_EVT32(pending_kickoff_cnt);
			SDE_EVT32(pending_kickoff_cnt, SDE_EVTLOG_FUNC_CASE2);
		}
	}