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

Commit 6515008c authored by Jeevan Shriram's avatar Jeevan Shriram Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: update bandwidth equation when pingpong split enabled



When pingpong split is enabled, single DSPP drives the two DSI
panels and bandwidth needs to be adjusted based on the complete
panel width. In the existing implementation, only left half of the
panel is being considered for bandwidth vote. This change addresses
issue with bandwidth calculations when pingpong split is enabled.

Change-Id: I24ab9dee80c75f25f8c41501f6b635d98de512a2
Signed-off-by: default avatarJeevan Shriram <jshriram@codeaurora.org>
parent c950223d
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -706,6 +706,35 @@ static inline int mdss_mdp_line_buffer_width(void)
	return MAX_LINE_BUFFER_WIDTH;
}

static inline u32 get_panel_yres(struct mdss_panel_info *pinfo)
{
	u32 yres;

	yres = pinfo->yres + pinfo->lcdc.border_top +
				pinfo->lcdc.border_bottom;
	return yres;
}

static inline u32 get_panel_xres(struct mdss_panel_info *pinfo)
{
	u32 xres;

	xres = pinfo->xres + pinfo->lcdc.border_left +
				pinfo->lcdc.border_right;
	return xres;
}

static inline u32 get_panel_width(struct mdss_mdp_ctl *ctl)
{
	u32 width;

	width = get_panel_xres(&ctl->panel_data->panel_info);
	if (ctl->panel_data->next && is_pingpong_split(ctl->mfd))
		width += get_panel_xres(&ctl->panel_data->next->panel_info);

	return width;
}

static inline int mdss_mdp_panic_signal_support_mode(
	struct mdss_data_type *mdata, struct mdss_mdp_pipe *pipe)
{
+9 −30
Original line number Diff line number Diff line
@@ -477,24 +477,6 @@ static bool is_factor_needed(struct mdss_mdp_perf_params *perf_temp,
			perf_temp->bw_vote_mode);
}

static inline u32 get_panel_yres(struct mdss_panel_info *pinfo)
{
	u32 yres;

	yres = pinfo->yres + pinfo->lcdc.border_top +
				pinfo->lcdc.border_bottom;
	return yres;
}

static inline u32 get_panel_xres(struct mdss_panel_info *pinfo)
{
	u32 xres;

	xres = pinfo->xres + pinfo->lcdc.border_left +
				pinfo->lcdc.border_right;
	return xres;
}

static u32 mdss_mdp_get_rotator_fps(struct mdss_mdp_pipe *pipe)
{
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
@@ -558,6 +540,9 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe,
	} else if (mixer->type != MDSS_MDP_MIXER_TYPE_WRITEBACK) {
		struct mdss_panel_info *pinfo;

		if (!mixer->ctl)
			return -EINVAL;

		pinfo = &mixer->ctl->panel_data->panel_info;
		if (pinfo->type == MIPI_VIDEO_PANEL) {
			fps = pinfo->panel_max_fps;
@@ -566,9 +551,14 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe,
			fps = mdss_panel_get_framerate(pinfo);
			v_total = mdss_panel_get_vtotal(pinfo);
		}
		xres = get_panel_xres(pinfo);
		xres = get_panel_width(mixer->ctl);
		is_fbc = pinfo->fbc.enabled;
		h_total = mdss_panel_get_htotal(pinfo, false);

		if (is_pingpong_split(mixer->ctl->mfd))
			h_total += mdss_panel_get_htotal(
				&mixer->ctl->panel_data->next->panel_info,
				false);
	} else {
		v_total = mixer->height;
		xres = mixer->width;
@@ -1896,17 +1886,6 @@ static int mdss_mdp_ctl_fbc_enable(int enable,
	return 0;
}

static inline u32 get_panel_width(struct mdss_mdp_ctl *ctl)
{
	u32 width;

	width = get_panel_xres(&ctl->panel_data->panel_info);
	if (ctl->panel_data->next && is_pingpong_split(ctl->mfd))
		width += get_panel_xres(&ctl->panel_data->next->panel_info);

	return width;
}

void mdss_mdp_get_interface_type(struct mdss_mdp_ctl *ctl, int *intf_type,
		int *split_needed)
{