From fe19eefad3ddfc073c6613d4a044d14d50709726 Mon Sep 17 00:00:00 2001 From: Fancy Fang Date: Wed, 15 Apr 2015 14:59:08 +0800 Subject: MLK-10573-2 dma: pxp-v2: add two planes output support The output channel support two planes YUV formats. So the output UV buffer should also be configured in this case. Signed-off-by: Fancy Fang (cherry picked from commit 6b360c61ed3371827417ed534b425ec243ea4313) --- drivers/dma/pxp/pxp_dma_v2.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/dma/pxp/pxp_dma_v2.c b/drivers/dma/pxp/pxp_dma_v2.c index c850c5eddcf7..77c405ed461a 100644 --- a/drivers/dma/pxp/pxp_dma_v2.c +++ b/drivers/dma/pxp/pxp_dma_v2.c @@ -407,6 +407,18 @@ static void pxp_set_outbuf(struct pxps *pxp) __raw_writel(out_params->paddr, pxp->base + HW_PXP_OUT_BUF); + if ((out_params->pixel_fmt == PXP_PIX_FMT_NV12) || + (out_params->pixel_fmt == PXP_PIX_FMT_NV21) || + (out_params->pixel_fmt == PXP_PIX_FMT_NV16) || + (out_params->pixel_fmt == PXP_PIX_FMT_NV61)) { + dma_addr_t Y, U; + + Y = out_params->paddr; + U = Y + (out_params->width * out_params->height); + + __raw_writel(U, pxp->base + HW_PXP_OUT_BUF2); + } + if (proc_data->rotate == 90 || proc_data->rotate == 270) __raw_writel(BF_PXP_OUT_LRC_X(out_params->height - 1) | BF_PXP_OUT_LRC_Y(out_params->width - 1), -- cgit v1.2.3