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

Commit 068d4591 authored by Raviteja Tamatam's avatar Raviteja Tamatam
Browse files

drm/msm/dsi-staging: serialize DSI ESD trigger commands



Esd trigger command from adb need to be ignored if already
another esd recovery process is in progress.

Change-Id: I69cd4c0d59c4197d6dfbfc1198feedbfe66e3cc0
Signed-off-by: default avatarRaviteja Tamatam <travitej@codeaurora.org>
parent 38598f03
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -388,6 +388,7 @@ static irqreturn_t dsi_display_panel_te_irq_handler(int irq, void *data)
	if (!display)
		return IRQ_HANDLED;

	SDE_EVT32(SDE_EVTLOG_FUNC_CASE1);
	complete_all(&display->esd_te_gate);
	return IRQ_HANDLED;
}
@@ -1265,6 +1266,10 @@ static ssize_t debugfs_esd_trigger_check(struct file *file,
	if (!user_len || !user_buf)
		return -EINVAL;

	if (!display->panel ||
		atomic_read(&display->panel->esd_recovery_pending))
		return user_len;

	buf = kzalloc(user_len, GFP_KERNEL);
	if (!buf)
		return -ENOMEM;