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

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

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

parents 5b76e2ed 7562363f
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;