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

Commit c7eca863 authored by Jayant Shekhar's avatar Jayant Shekhar
Browse files

drm/msm/sde: mitigate error log in IRQ handler



In certain race condition scenarios, when unregister
callback is triggered while MDP is handling IRQ, the
irq table might be empty. Mitigate error log in cases
where enable count is 0.

Change-Id: I228e45dc1798614b5e2ca8fd12ac7f7835298aed
Signed-off-by: default avatarJayant Shekhar <jshekhar@codeaurora.org>
parent 099e9fc7
Loading
Loading
Loading
Loading
+16 −3
Original line number Diff line number Diff line
@@ -55,10 +55,23 @@ static void sde_core_irq_callback_handler(void *arg, int irq_idx)
	spin_unlock_irqrestore(&sde_kms->irq_obj.cb_lock, irq_flags);

	if (cb_tbl_error) {
		SDE_ERROR("irq has no registered callback, idx %d enables %d\n",
		/*
		 * If enable count is zero and callback list is empty, then it's
		 * not a fatal issue. Log this case as debug. If the enable
		 * count is nonzero and callback list is empty, then its a real
		 * issue. Log this case as error to ensure we don't have silent
		 * IRQs running.
		 */
		if (!enable_counts) {
			SDE_DEBUG("irq has no callback, idx %d enables %d\n",
					irq_idx, enable_counts);
			SDE_EVT32_IRQ(irq_idx, enable_counts);
		} else {
			SDE_ERROR("irq has no callback, idx %d enables %d\n",
					irq_idx, enable_counts);
			SDE_EVT32_IRQ(irq_idx, enable_counts, SDE_EVTLOG_ERROR);
		}
	}

	/*
	 * Clear pending interrupt status in HW.