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

Commit c577e924 authored by Nilaan Gunabalachandran's avatar Nilaan Gunabalachandran Committed by Jayaprakash Madisetty
Browse files

disp: msm: sde: poll for rsvp nxt after idle



During mode enable after idle, rsvp next would be set without
rsvp cur. Back to back test only should be serialized, but currently
this would be possible right after idle. This is established by
commit 11aab5f9c382 ("disp: msm: sde: Fix null dereference errors").
This change updates the condition to poll for rsvp next clear
during this usecase as well.

Change-Id: I300254967cbec69fff8b31545b8d659afc56f283
Signed-off-by: default avatarNilaan Gunabalachandran <ngunabal@codeaurora.org>
parent 5d77c36d
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved.
 */

#define pr_fmt(fmt)	"[drm:%s] " fmt, __func__
@@ -2184,13 +2184,14 @@ int sde_rm_reserve(
	 * Poll for rsvp_nxt clear, allow the check_only commit if rsvp_nxt
	 * gets cleared and bailout if it does not get cleared before timeout.
	 */
	if (test_only && rsvp_cur && rsvp_nxt) {
	if (test_only && rsvp_nxt) {
		rsvp_nxt = _sde_rm_poll_get_rsvp_nxt_locked(rm, enc);
		if (rsvp_nxt) {
			SDE_ERROR("poll timeout cur %d nxt %d enc %d\n",
				rsvp_cur->seq, rsvp_nxt->seq, enc->base.id);
			SDE_EVT32(rsvp_cur->seq, rsvp_nxt->seq,
					 enc->base.id, SDE_EVTLOG_ERROR);
				(rsvp_cur) ? rsvp_cur->seq : -1,
				rsvp_nxt->seq, enc->base.id);
			SDE_EVT32(enc->base.id, (rsvp_cur) ? rsvp_cur->seq : -1,
					rsvp_nxt->seq, SDE_EVTLOG_ERROR);
			ret = -EINVAL;
			goto end;
		}