summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorGuoniu.Zhou <guoniu.zhou@nxp.com>2018-03-23 11:41:49 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit0526cbb1831d893116bedfd94eb60c2527430366 (patch)
treedcc7ea34c3cf246a51ed38d0c27415849309a318 /drivers/dma
parent2d7e6bf40803d482747b3e7e6a95c1b1e6692d77 (diff)
MLK-17487: pxp: fix pxp yuv to yuv generate color dots issue
When PxP convert yuyv to nv12 format, some color dots will introdue to output image. IC recommend that YCBCR_MODE and BYPASS bit of CSC1_COEF0 should be 1. Reviewed-by: robby.cai <robby.cai@nxp.com> Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/pxp/pxp_dma_v3.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/dma/pxp/pxp_dma_v3.c b/drivers/dma/pxp/pxp_dma_v3.c
index 5a613e97bb09..48c3144ffce8 100644
--- a/drivers/dma/pxp/pxp_dma_v3.c
+++ b/drivers/dma/pxp/pxp_dma_v3.c
@@ -3021,7 +3021,6 @@ static int pxp_2d_task_config(struct pxp_pixmap *input,
{
uint8_t position = 0;
-
do {
position = find_next_bit((unsigned long *)&nodes_used, 32, position);
if (position >= sizeof(uint32_t) * 8)
@@ -3151,6 +3150,7 @@ static int pxp_2d_op_handler(struct pxps *pxp)
uint32_t partial_nodes_used = 0;
uint32_t nodes_used_s0 = 0, nodes_used_s1 = 0;
uint32_t nodes_in_path_s0, nodes_in_path_s1;
+ uint32_t val;
output = &task->output[0];
if (!output->pitch)
@@ -3287,6 +3287,13 @@ reparse:
pr_debug("%s: path_ctrl0 = 0x%x\n",
__func__, *(uint32_t *)&path_ctrl0);
pxp_2d_task_config(input, output, op, nodes_used);
+
+ if (is_yuv(input->format) && is_yuv(output->format)) {
+ val = readl(pxp_reg_base + HW_PXP_CSC1_COEF0);
+ val |= (BF_PXP_CSC1_COEF0_YCBCR_MODE(1) |
+ BF_PXP_CSC1_COEF0_BYPASS(1));
+ pxp_writel(val, HW_PXP_CSC1_COEF0);
+ }
break;
case 2:
/* Composite */