aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfang hui <hui.fang@nxp.com>2018-03-25 18:15:50 +0800
committerTerry (Woncheol) Heo <terryheo@google.com>2018-03-28 04:03:44 +0000
commitc03a8ddf5de4473b39739d2d6eb402ae9c1bd446 (patch)
tree29fcef0ab1babde2ac856256580efb1fc63ebb9a
parentc4897145b8ffd7325296061d9f86363d5406e5cb (diff)
downloadimx-v4.9-c03a8ddf5de4473b39739d2d6eb402ae9c1bd446.tar.gz
Fix color dots issue in video recording
When PxP converts yuyv to nv12 format, color dots had been appeared in an output image. IC recommends that both the YCBCR_MODE and BYPASS bit of CSC1_COEF0 should be 1. Bug: 72722819 Test: no color dot found in preview/still capture/video clips in every resolution. Change-Id: I75d108e42a1db7fc437b8aa46be5506c420711cb Signed-off-by: fang hui <hui.fang@nxp.com> (cherry picked from commit 1471b15c112a8021e5749c2bd30c8e2e48b5d8b3)
-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 8d129bea3a0d..c23201dee2c3 100644
--- a/drivers/dma/pxp/pxp_dma_v3.c
+++ b/drivers/dma/pxp/pxp_dma_v3.c
@@ -2647,7 +2647,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)
@@ -2776,6 +2775,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)
@@ -2898,6 +2898,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 */