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

Commit 0e9e0221 authored by Krishna Manikandan's avatar Krishna Manikandan Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm/sde: consider transfer time factor in pclk calculation



In certain panels with low porch values, the current calculated
pclk is less MDP clock value when transfer time is
considered in command mode. This was leading to higher ping pong
transfer time. New changes made takes this factor into
consideration in pclk calculation in command mode.

Change-Id: I1a8dcac187f26e5b547754199c1c5a98346d9656
Signed-off-by: default avatarRaviteja Tamatam <travitej@codeaurora.org>
Signed-off-by: default avatarKrishna Manikandan <mkrishn@codeaurora.org>
parent 02c66a3f
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -40,6 +40,9 @@
#define TO_ON_OFF(x) ((x) ? "ON" : "OFF")

#define CEIL(x, y)              (((x) + ((y)-1)) / (y))

#define TICKS_IN_MICRO_SECOND    1000000

/**
 * enum dsi_ctrl_driver_ops - controller driver ops
 */
@@ -830,7 +833,7 @@ static int dsi_ctrl_update_link_freqs(struct dsi_ctrl *dsi_ctrl,
{
	int rc = 0;
	u32 num_of_lanes = 0;
	u32 bpp;
	u32 bpp, refresh_rate = TICKS_IN_MICRO_SECOND;
	u64 h_period, v_period, bit_rate, pclk_rate, bit_rate_per_lane,
	    byte_clk_rate;
	struct dsi_host_common_cfg *host_cfg = &config->common_config;
@@ -851,7 +854,13 @@ static int dsi_ctrl_update_link_freqs(struct dsi_ctrl *dsi_ctrl,
	if (config->bit_clk_rate_hz_override == 0) {
		h_period = DSI_H_TOTAL_DSC(timing);
		v_period = DSI_V_TOTAL(timing);
		bit_rate = h_period * v_period * timing->refresh_rate * bpp;

		if (config->panel_mode == DSI_OP_CMD_MODE)
			do_div(refresh_rate, timing->mdp_transfer_time_us);
		else
			refresh_rate = timing->refresh_rate;

		bit_rate = h_period * v_period * refresh_rate * bpp;
	} else {
		bit_rate = config->bit_clk_rate_hz_override * num_of_lanes;
	}
+2 −0
Original line number Diff line number Diff line
@@ -3365,6 +3365,8 @@ int dsi_panel_get_host_cfg_for_mode(struct dsi_panel *panel,

	memcpy(&config->video_timing, &mode->timing,
	       sizeof(config->video_timing));
	config->video_timing.mdp_transfer_time_us =
			mode->priv_info->mdp_transfer_time_us;
	config->video_timing.dsc_enabled = mode->priv_info->dsc_enabled;
	config->video_timing.dsc = &mode->priv_info->dsc;