msm: sde: Set minimum traffic shaping in sde rotator

SDE rotator cannot accept 0 value for traffic shaping. This fix is to
limit the minimum traffic shaping value to be 1.

CRs-Fixed: 2074997
Change-Id: I5c96d600d77a5bfe09fe2667b914cb498371391e
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
This commit is contained in:
Benjamin Chan 2017-07-12 10:21:39 -04:00
parent 3629cb733f
commit d7ead4950a

View file

@ -814,6 +814,9 @@ static void sde_hw_rotator_setup_wbengine(struct sde_hw_rotator_context *ctx,
bw /= TRAFFIC_SHAPE_CLKTICK_12MS; bw /= TRAFFIC_SHAPE_CLKTICK_12MS;
if (bw > 0xFF) if (bw > 0xFF)
bw = 0xFF; bw = 0xFF;
else if (bw == 0)
bw = 1;
SDE_REGDMA_WRITE(wrptr, ROT_WB_TRAFFIC_SHAPER_WR_CLIENT, SDE_REGDMA_WRITE(wrptr, ROT_WB_TRAFFIC_SHAPER_WR_CLIENT,
BIT(31) | bw); BIT(31) | bw);
SDEROT_DBG("Enable ROT_WB Traffic Shaper:%d\n", bw); SDEROT_DBG("Enable ROT_WB Traffic Shaper:%d\n", bw);