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

Commit aa7e87f2 authored by Padmanabhan Komanduru's avatar Padmanabhan Komanduru
Browse files

msm: mdss: fix logic in DSI data lane overflow recovery



The DSI lane overflow recovery should be done only during
active region. Currently, we consider the vertical front
porch also to be part of minimum line count check. This needs
to be fixed since vertical front porch region arrives after
the MDP active region. Also consider the minimum line count
while checking the upper limit of the current MDP line count.

Change-Id: I02401be74ff3af303624eacae8576dd5ccada3f3
Signed-off-by: default avatarPadmanabhan Komanduru <pkomandu@codeaurora.org>
parent 3a82db8d
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -173,8 +173,7 @@ static void mdss_mdp_video_intf_recovery(void *data, int event)
		pr_err("Unable to calculate clock period\n");
		return;
	}
	min_ln_cnt = pinfo->lcdc.v_back_porch + pinfo->lcdc.v_front_porch
						  + pinfo->lcdc.v_pulse_width;
	min_ln_cnt = pinfo->lcdc.v_back_porch + pinfo->lcdc.v_pulse_width;
	active_lns_cnt = pinfo->yres;
	time_of_line = (pinfo->lcdc.h_back_porch +
		 pinfo->lcdc.h_front_porch +
@@ -182,7 +181,8 @@ static void mdss_mdp_video_intf_recovery(void *data, int event)
		 pinfo->xres) * clk_period;

	/* delay in micro seconds */
	delay = (time_of_line * min_ln_cnt) / 1000000;
	delay = (time_of_line * (min_ln_cnt +
			pinfo->lcdc.v_front_porch)) / 1000000;

	/*
	 * Wait for max delay before
@@ -194,7 +194,8 @@ static void mdss_mdp_video_intf_recovery(void *data, int event)
	while (1) {
		line_cnt = mdss_mdp_video_line_count(ctl);

		if ((line_cnt >= min_ln_cnt) && (line_cnt < active_lns_cnt)) {
		if ((line_cnt >= min_ln_cnt) && (line_cnt <
			(active_lns_cnt + min_ln_cnt))) {
			pr_debug("%s, Needed lines left line_cnt=%d\n",
						__func__, line_cnt);
			return;