diff options
author | Guoniu.Zhou <guoniu.zhou@nxp.com> | 2017-08-25 18:48:32 +0800 |
---|---|---|
committer | Guoniu.Zhou <guoniu.zhou@nxp.com> | 2017-08-30 12:11:25 +0800 |
commit | 14c988f1eb7e9471b0875016df29708865727fbb (patch) | |
tree | 1c994597fdb5dfc257ca52ce5d7122348976064d | |
parent | 963fea909ef5e42294cb2e656e5e3870a2171c01 (diff) |
MLK-16252: PxP: fix video shift issue
If pxp use crop x/y valuse as the upper left coordinate in
out buffer, pxp driver only need to write out buffer base
address to pxp out_buf register. If pxp driver use zero as
ps_ulc register value, pxp out_buf register need an offset
added with out buffer base address.
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
-rw-r--r-- | drivers/dma/pxp/pxp_dma_v3.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dma/pxp/pxp_dma_v3.c b/drivers/dma/pxp/pxp_dma_v3.c index 9aec499e4c5b..50e1d79c81ce 100644 --- a/drivers/dma/pxp/pxp_dma_v3.c +++ b/drivers/dma/pxp/pxp_dma_v3.c @@ -2314,8 +2314,8 @@ static int pxp_ps_config(struct pxp_pixmap *input, case 0: out_ps_ulc.x = output->crop.x; out_ps_ulc.y = output->crop.y; - out_ps_lrc.x = output->crop.width - 1; - out_ps_lrc.y = output->crop.height - 1; + out_ps_lrc.x = out_ps_ulc.x + output->crop.width - 1; + out_ps_lrc.y = out_ps_ulc.y + output->crop.height - 1; break; case 90: out_ps_ulc.x = output->crop.y; @@ -2618,7 +2618,7 @@ static int pxp_out_config(struct pxp_pixmap *output) pxp_writel(*(uint32_t *)&ctrl, HW_PXP_OUT_CTRL); - pxp_writel(output->paddr + offset, HW_PXP_OUT_BUF); + pxp_writel(output->paddr, HW_PXP_OUT_BUF); if (is_yuv(output->format) == 2) { UV = output->paddr + output->width * output->height; if ((output->format == PXP_PIX_FMT_NV16) || |