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

Commit 7562363f authored by Raviteja Tamatam's avatar Raviteja Tamatam
Browse files

drm/msm/sde: signal retire fence at ctl start timeout



When ctl start irq is not received retire fence is not signaled
and this is leading to device freeze. By signaling the retire fence
at ctl start timeout will allow for next commit and avoid
device freeze.

Change-Id: I968807d5f2a5a8e30369559f0a269b0f625dbbdc
Signed-off-by: default avatarRaviteja Tamatam <travitej@codeaurora.org>
parent c9979434
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -1425,6 +1425,25 @@ static int _sde_encoder_phys_cmd_wait_for_ctl_start(
					"ctl start interrupt wait failed\n");
		else
			ret = 0;

		if (sde_encoder_phys_cmd_is_master(phys_enc)) {
			/*
			 * Signaling the retire fence at ctl start timeout
			 * to allow the next commit and avoid device freeze.
			 * As ctl start timeout can occurs due to no read ptr,
			 * updating pending_rd_ptr_cnt here may not cover all
			 * cases. Hence signaling the retire fence.
			 */
			if (atomic_add_unless(
			 &phys_enc->pending_retire_fence_cnt, -1, 0))
				phys_enc->parent_ops.handle_frame_done(
				 phys_enc->parent,
				 phys_enc,
				 SDE_ENCODER_FRAME_EVENT_SIGNAL_RETIRE_FENCE);
			atomic_add_unless(
				&phys_enc->pending_ctlstart_cnt, -1, 0);
		}

	}

	return ret;