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

Commit 90056126 authored by Harigovindan P's avatar Harigovindan P Committed by Gerrit - the friendly Code Review server
Browse files

disp: msm: dsi: dual dsi constant fps porch calculation



This change adds porch calculation support to maintain
constant fps during clock switch for dual DSI controller.

Change-Id: I9a7e6d1f6d028355dba30aafe0234fc30c153059
Signed-off-by: default avatarHarigovindan P <harigovi@codeaurora.org>
parent d95bd8bf
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -6090,6 +6090,7 @@ void dsi_display_adjust_mode_timing(struct dsi_display *display,
	case DSI_DYN_CLK_TYPE_CONST_FPS_ADJUST_HFP:
		vtotal = DSI_V_TOTAL(&dsi_mode->timing);
		old_htotal = DSI_H_TOTAL_DSC(&dsi_mode->timing);
		do_div(old_htotal, display->ctrl_count);
		new_htotal = dsi_mode->timing.clk_rate_hz * lanes;
		div = bpp * vtotal * dsi_mode->timing.refresh_rate;
		if (dsi_display_is_type_cphy(display)) {
@@ -6099,14 +6100,15 @@ void dsi_display_adjust_mode_timing(struct dsi_display *display,
		do_div(new_htotal, div);
		if (old_htotal > new_htotal)
			dsi_mode->timing.h_front_porch -=
					(old_htotal - new_htotal);
			((old_htotal - new_htotal) * display->ctrl_count);
		else
			dsi_mode->timing.h_front_porch +=
					(new_htotal - old_htotal);
			((new_htotal - old_htotal) * display->ctrl_count);
		break;

	case DSI_DYN_CLK_TYPE_CONST_FPS_ADJUST_VFP:
		htotal = DSI_H_TOTAL_DSC(&dsi_mode->timing);
		do_div(htotal, display->ctrl_count);
		new_vtotal = dsi_mode->timing.clk_rate_hz * lanes;
		div = bpp * htotal * dsi_mode->timing.refresh_rate;
		if (dsi_display_is_type_cphy(display)) {