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

Commit 56c1b254 authored by Benjamin Chan's avatar Benjamin Chan Committed by Abhijith Desai
Browse files

msm: mdss: Correct MDSS display wakeup time calculation



With DSC enabled in the panel interface, the horizontal resolution is
smaller than the panel width due to the compression. Correcting the
time_of_line and total_line calculation by calling the proper macro.

CRs-Fixed: 2048339
Change-Id: I36c1b9d30d5a440dfef4b4638f4f3ebf807782c8
Signed-off-by: default avatarBenjamin Chan <bkchan@codeaurora.org>
parent ff12bfec
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -2739,10 +2739,7 @@ int mdss_mdp_display_wakeup_time(struct mdss_mdp_ctl *ctl,
	if (!clk_period)
		return -EINVAL;

	time_of_line = (pinfo->lcdc.h_back_porch +
		 pinfo->lcdc.h_front_porch +
		 pinfo->lcdc.h_pulse_width +
		 pinfo->xres) * clk_period;
	time_of_line = mdss_panel_get_htotal(pinfo, true) * clk_period;

	time_of_line /= 1000;	/* in nano second */
	if (!time_of_line)
@@ -2750,10 +2747,7 @@ int mdss_mdp_display_wakeup_time(struct mdss_mdp_ctl *ctl,

	current_line = ctl->ops.read_line_cnt_fnc(ctl);

	total_line = pinfo->lcdc.v_back_porch +
		pinfo->lcdc.v_front_porch +
		pinfo->lcdc.v_pulse_width +
		pinfo->yres;
	total_line = mdss_panel_get_vtotal(pinfo);

	if (current_line >= total_line)
		time_to_vsync = time_of_line * total_line;