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

Commit ee3ecf0f authored by Ujwal Patel's avatar Ujwal Patel Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: fix OT limit configuration for WB1 module



Each VBIF client can be configured for its number of outstanding (OT)
transactions. Currently we can have as high as 13 of these VBIF clients
within MDP. OT configuration for these clients is spread across multiple
registers. Current implementation of rotator OT limit is not considering
these multiple registers which leads to incorrect OT limit configuration
for WB1 WR VBIF client. Fix this by adding logic to select correct
register offset.

Change-Id: I7b4f7ac37ff5c8a85f35dbeb6a6c450b157c4b3a
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent 63704274
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -475,7 +475,7 @@ static int mdss_mdp_writeback_display(struct mdss_mdp_ctl *ctl, void *arg)
{
	struct mdss_mdp_writeback_ctx *ctx;
	struct mdss_mdp_writeback_arg *wb_args;
	u32 flush_bits, val, off;
	u32 flush_bits, val, bit_off, reg_off;
	int ret;

	if (!ctl || !ctl->mdata)
@@ -496,11 +496,16 @@ static int mdss_mdp_writeback_display(struct mdss_mdp_ctl *ctl, void *arg)
			ctx->wr_lim = ctl->mdata->rotator_ot_limit;
		else
			ctx->wr_lim = MDSS_DEFAULT_OT_SETTING;
		off = (ctx->xin_id % 4) * 8;
		val = readl_relaxed(ctl->mdata->vbif_base + VBIF_WR_LIM_CONF);
		val &= ~(0xFF << off);
		val |= (ctx->wr_lim) << off;
		writel_relaxed(val, ctl->mdata->vbif_base + VBIF_WR_LIM_CONF);

		reg_off = (ctx->xin_id / 4) * 4;
		bit_off = (ctx->xin_id % 4) * 8;

		val = readl_relaxed(ctl->mdata->vbif_base + VBIF_WR_LIM_CONF +
			reg_off);
		val &= ~(0xFF << bit_off);
		val |= (ctx->wr_lim) << bit_off;
		writel_relaxed(val, ctl->mdata->vbif_base + VBIF_WR_LIM_CONF +
			reg_off);
	}

	wb_args = (struct mdss_mdp_writeback_arg *) arg;