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: Harigovindan P <harigovi@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
This commit is contained in:
Harigovindan P
2020-06-05 18:48:29 +05:30
committed by Steve Cohen
父節點 4a86b80a50
當前提交 a976e8c7fa

查看文件

@@ -6474,6 +6474,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_dce(&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)) {
@@ -6483,14 +6484,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_dce(&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)) {