disp: msm: sde: fix traffic shaper prefill calculations

This change fixes traffic shaper prefill calculations
for prefill count and bytes per clock as per hardware
recommendations in the HPG which are calcualted as below:

ts_ count = ts_end*19200000/fps/(vtotal)

ts_bytes_per_clk = ceil(h_src*v_src*bpp*fps/
			19200000*amortized_pref_rate)

Change-Id: Icc2348421a2124daa3b0056f46d7a6a45021381b
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
Dieser Commit ist enthalten in:
Yashwanth
2021-10-27 13:23:33 +05:30
Ursprung ce1eceafb0
Commit 50aa3cd210

Datei anzeigen

@@ -1082,17 +1082,14 @@ static void sde_hw_sspp_setup_ts_prefill(struct sde_hw_pipe *ctx,
}
if (cfg->time) {
u64 temp = DIV_ROUND_UP_ULL(TS_CLK * 1000000ULL, cfg->time);
ts_bytes = temp * cfg->size;
ts_count = DIV_ROUND_UP_ULL(TS_CLK * cfg->time, 1000000ULL);
ts_bytes = DIV_ROUND_UP_ULL(cfg->size, ts_count);
if (ts_bytes > SSPP_TRAFFIC_SHAPER_BPC_MAX)
ts_bytes = SSPP_TRAFFIC_SHAPER_BPC_MAX;
}
if (ts_bytes) {
ts_count = DIV_ROUND_UP_ULL(cfg->size, ts_bytes);
if (ts_count)
ts_bytes |= BIT(31) | BIT(27);
}
SDE_REG_WRITE(&ctx->hw, ts_offset, ts_bytes);
SDE_REG_WRITE(&ctx->hw, ts_prefill_offset, ts_count);