disp: msm: dsi: add generic API for calculating horizontal timings

Add a generic API which calculates the horizontal timings based
on the compression type in case compression is enabled and even
for non-compression cases.

Replace the usage of the DSC macros with this generic API.

Change-Id: Ie9174c20adc51a0be7c9127529d41faa4b473b55
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
This commit is contained in:
Abhinav Kumar
2019-09-03 19:07:05 -07:00
committed by Gerrit - the friendly Code Review server
parent c4f5050e13
commit 64ee2c4d72
5 changed files with 28 additions and 30 deletions

View File

@@ -2195,7 +2195,7 @@ static int dsi_panel_parse_phy_timing(struct dsi_display_mode *mode,
* function dsi_panel_calc_dsi_transfer_time( )
* as we set it based on dsi clock or mdp transfer time.
*/
pixel_clk_khz = (DSI_H_TOTAL_DSC(&mode->timing) *
pixel_clk_khz = (dsi_h_total_dce(&mode->timing) *
DSI_V_TOTAL(&mode->timing) *
mode->timing.refresh_rate);
do_div(pixel_clk_khz, 1000);
@@ -3504,7 +3504,7 @@ void dsi_panel_calc_dsi_transfer_time(struct dsi_host_common_cfg *config,
min_bitclk_hz = (bits_per_line * timing->v_active *
timing->refresh_rate);
} else {
total_active_pixels = ((DSI_H_ACTIVE_DSC(timing)
total_active_pixels = ((dsi_h_active_dce(timing)
* timing->v_active));
/* calculate the actual bitclk needed to transfer the frame */
min_bitclk_hz = (total_active_pixels * (timing->refresh_rate) *