1
0
Fork 0

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>
(cherry picked from commit 14c988f1eb)
pull/10/head
Guoniu.Zhou 2017-08-25 18:48:32 +08:00 committed by Jason Liu
parent 71da7734b0
commit 286043a046
1 changed files with 3 additions and 3 deletions

View File

@ -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) ||