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

Commit a04fece1 authored by Ujwal Patel's avatar Ujwal Patel
Browse files

msm: mdss: fix watchdog bite due to ping-pong timeout log flooding



Most likely root cause of ping-pong timeouts is a pipeline hang in the
display controller. These pipeline hangs can happen due to bad frame
configuration and if this bad configuration persists every frame then
ping-pong timeouts will flood the console with warning logs and may lead
to watchdog bite. Fix this by reporting ping-pong timeout only once every
bad configuration.

Change-Id: I1dc7a729f10e70e2bed947dd72713c0adfe96942
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent 54952983
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ struct mdss_mdp_cmd_ctx {
	atomic_t pp_done_cnt;
	struct mdss_panel_recovery recovery;
	struct mdss_mdp_cmd_ctx *sync_ctx; /* for partial update */
	u32 pp_timeout_report_cnt;
};

struct mdss_mdp_cmd_ctx mdss_mdp_cmd_ctx_list[MAX_SESSIONS];
@@ -569,14 +570,18 @@ static int mdss_mdp_cmd_wait4pingpong(struct mdss_mdp_ctl *ctl, void *arg)
		}

		if (rc <= 0) {
			if (!ctx->pp_timeout_report_cnt) {
				WARN(1, "cmd kickoff timed out (%d) ctl=%d\n",
						rc, ctl->num);
				MDSS_XLOG_TOUT_HANDLER("mdp", "dsi0", "dsi1",
						"edp", "hdmi", "panic");
			}
			ctx->pp_timeout_report_cnt++;
			rc = -EPERM;
			mdss_mdp_ctl_notify(ctl, MDP_NOTIFY_FRAME_TIMEOUT);
		} else {
			rc = 0;
			ctx->pp_timeout_report_cnt = 0;
		}
	}

@@ -946,6 +951,7 @@ static int mdss_mdp_cmd_intfs_setup(struct mdss_mdp_ctl *ctl,

	ctx->ctl = ctl;
	ctx->pp_num = (is_split_dst(ctl->mfd) ? session : mixer->num);
	ctx->pp_timeout_report_cnt = 0;
	init_completion(&ctx->pp_comp);
	init_completion(&ctx->stop_comp);
	spin_lock_init(&ctx->clk_lock);