summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFancy Fang <chen.fang@freescale.com>2015-04-15 14:59:08 +0800
committerguoyin.chen <guoyin.chen@freescale.com>2015-05-08 17:26:36 +0800
commitfe19eefad3ddfc073c6613d4a044d14d50709726 (patch)
tree91542a989243f88dd87b74a26ae025156588937f
parent9d7e88b07d0e12a742545678f6b1d0e7784ab470 (diff)
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 <chen.fang@freescale.com> (cherry picked from commit 6b360c61ed3371827417ed534b425ec243ea4313)
-rw-r--r--drivers/dma/pxp/pxp_dma_v2.c12
1 files changed, 12 insertions, 0 deletions
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),