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

Commit 246787af authored by Raviteja Tamatam's avatar Raviteja Tamatam Committed by Abhijith Desai
Browse files

msm: mdss: disable programmable fetch when not in use



During the resolution switch use case where the active resolution
needs prefetch but the new resolution doesnot require it, currently
programmable fetch blocks are not disabled if not in use.

Change-Id: Ib5ea8ef75308132f5530aaf35aaea53858ea94a2
Signed-off-by: default avatarRaviteja Tamatam <travitej@codeaurora.org>
parent 4592f1d8
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -1678,7 +1678,7 @@ static void mdss_mdp_fetch_end_config(struct mdss_mdp_video_ctx *ctx,
static void mdss_mdp_fetch_start_config(struct mdss_mdp_video_ctx *ctx,
		struct mdss_mdp_ctl *ctl)
{
	int fetch_start, fetch_enable, v_total, h_total;
	int fetch_start = 0, fetch_enable, v_total, h_total;
	struct mdss_data_type *mdata;
	struct mdss_panel_info *pinfo = &ctl->panel_data->panel_info;

@@ -1687,6 +1687,15 @@ static void mdss_mdp_fetch_start_config(struct mdss_mdp_video_ctx *ctx,
	pinfo->prg_fet = mdss_mdp_get_prefetch_lines(pinfo);
	if (!pinfo->prg_fet) {
		pr_debug("programmable fetch is not needed/supported\n");

		fetch_enable = mdp_video_read(ctx, MDSS_MDP_REG_INTF_CONFIG);
		fetch_enable &= ~BIT(31);

		mdp_video_write(ctx, MDSS_MDP_REG_INTF_CONFIG, fetch_enable);
		mdp_video_write(ctx, MDSS_MDP_REG_INTF_PROG_FETCH_START,
						fetch_start);

		MDSS_XLOG(ctx->intf_num, fetch_enable, fetch_start);
		return;
	}