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

Commit 08d04c2f authored by Mahadevan's avatar Mahadevan
Browse files

disp: msm: sde: avoid rc restart when triggered from panel dead



This change prevents scheduling of rc_restart in case of
panel dead. This early return is required to avoid the list
add corruption when a race condition happens between event
thread and commit thread. When event thread is handling
display failure notification if the virt_enable arrives in
commit thread it will reinizialize kthread for
delayed_off_work without deactivating the existing list
which leads to linkage corruption.

Change-Id: I41d08cd47ba6f887f0860e52bcddf414085524bb
Signed-off-by: default avatarMahadevan <mahap@codeaurora.org>
parent 87440766
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2021, The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <robdclark@gmail.com>
 *
@@ -1626,6 +1626,10 @@ static void _sde_encoder_rc_restart_delayed(struct sde_encoder_virt *sde_enc,
	unsigned int lp, idle_pc_duration;
	struct msm_drm_thread *disp_thread;

	/* return early if called from esd thread */
	if (!sde_enc->delay_kickoff)
		return;

	/* set idle timeout based on master connector's lp value */
	if (sde_enc->cur_master)
		lp = sde_connector_get_lp(