summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2015-10-16 11:26:59 +0800
committerLiu Ying <Ying.Liu@freescale.com>2015-10-22 15:07:31 +0800
commit4d8d6705a004d0162156a6179f66798c1bbba90f (patch)
treecd357be08cb379595c786d07e7abe0ab410058a6
parent3b4f7178854e428fb5ef08d554b13abe4f27c533 (diff)
MLK-11722 mxc IPUv3: PRE: Correct block mode bad update window calculation
In order to workaround the PRE SoC bug recorded by errata ERR009624, the software cannot write the PRE_CTRL register when the PRE writes the PRE_CTRL register automatically to set the ENABLE bit(bit0) to 1 in the PRE repeat mode. In non-small y resolution cases(>9 lines), we choose to check the STORE_BLOCK_Y field of the register HW_PRE_STRORE_ENGINE_STATUS to determine the bad window to update the SDW_UDPATE bit of the PRE_CTRL register. According to the description of the STRORE_BLOCK_Y field in block mode, the field indicates the Y coordinate of the block currently being rendered. Thus, we should round up the real display y resolution to 4 lines to align with the block high(the out- standing lines are cropped by PRG and IPU). To maximize the safe window, we just need to avoid updating the shadow bit during the last block of lines. To conclude, the bad window for block mode is (store_block_y == 0 || store_block_y >= DIV_ROUND_UP(y_resolution, 4) - 1). Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit 1e21175555e4f35f87130a5f8839fac6a3e998b5)
-rw-r--r--drivers/mxc/ipu3/pre.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mxc/ipu3/pre.c b/drivers/mxc/ipu3/pre.c
index 6fb61c47606b..e625d272d60c 100644
--- a/drivers/mxc/ipu3/pre.c
+++ b/drivers/mxc/ipu3/pre.c
@@ -876,7 +876,8 @@ int ipu_pre_set_fb_buffer(int id, bool resolve,
BM_PRE_STORE_ENGINE_STATUS_STORE_BLOCK_Y) >>
BP_PRE_STORE_ENGINE_STATUS_STORE_BLOCK_Y;
} while (store_block_y >=
- (y_res / (resolve ? 4 : 1) - 2) || store_block_y == 0);
+ (resolve ? DIV_ROUND_UP(y_res, 4) - 1 : y_res - 2) ||
+ store_block_y == 0);
}
if (update)