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

Commit 8b8c7dbc authored by Sandeep Panda's avatar Sandeep Panda
Browse files

drm/msm/sde: add check for panel dead during ping pong timeout



Currently during ping pong timeout case, before triggering
recovery there is a check to see if panel is sending TE
properly or not. But there can be cases where ESD recovery
is already underway and hence the panel TE check function
will early return. In that case panel TE check will pass
and driver will hit panic for platforms where recovery
event is not defined. This change fixes the same by adding
additional check for panel dead flag.

Change-Id: I1c899890a7dc0d20ad46e694a1e2ce871300b948
Signed-off-by: default avatarSandeep Panda <spanda@codeaurora.org>
parent 6464c0fa
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -519,6 +519,7 @@ static int _sde_encoder_phys_cmd_handle_ppdone_timeout(
	u32 frame_event = SDE_ENCODER_FRAME_EVENT_ERROR
				| SDE_ENCODER_FRAME_EVENT_SIGNAL_RELEASE_FENCE;
	struct drm_connector *conn;
	struct sde_connector *sde_conn;
	int event;
	u32 pending_kickoff_cnt;

@@ -526,6 +527,7 @@ static int _sde_encoder_phys_cmd_handle_ppdone_timeout(
		return -EINVAL;

	conn = phys_enc->connector;
	sde_conn = to_sde_connector(conn);
	cmd_enc->pp_timeout_report_cnt++;
	pending_kickoff_cnt = atomic_read(&phys_enc->pending_kickoff_cnt);

@@ -549,7 +551,8 @@ static int _sde_encoder_phys_cmd_handle_ppdone_timeout(
	atomic_add_unless(&phys_enc->pending_kickoff_cnt, -1, 0);

	/* check if panel is still sending TE signal or not */
	if (sde_connector_esd_status(phys_enc->connector))
	if (sde_connector_esd_status(phys_enc->connector) ||
	    sde_conn->panel_dead)
		goto exit;

	/* to avoid flooding, only log first time, and "dead" time */