summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuoniu.Zhou <guoniu.zhou@nxp.com>2017-07-05 12:20:33 +0800
committerGuoniu.Zhou <guoniu.zhou@nxp.com>2017-07-12 09:43:25 +0800
commita9423b181466e7b0a09ae9b697ae9e140292af71 (patch)
treee416e7920a118da1462d9236365538f6aa27ea2b
parent0c64ae47b79f3f86afab4bee84a8712581ec6921 (diff)
MLK-15325: pxp-v3: Modify pxp pitch parameter and csc
coefficient setting. Because the caller of pxp-v3 does not set the stride parameter, this will cause pitch parameter to be zero and pxp can't work. Correct the csc1 coefficient when use pxp convert YUV to RGB format. Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com> (cherry picked from commit 3005228b17b16d1455b72c66ddf96785b42adb0a)
-rw-r--r--drivers/dma/pxp/pxp_dma_v3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/pxp/pxp_dma_v3.c b/drivers/dma/pxp/pxp_dma_v3.c
index 37d63f072219..8d2e10edc14f 100644
--- a/drivers/dma/pxp/pxp_dma_v3.c
+++ b/drivers/dma/pxp/pxp_dma_v3.c
@@ -2647,7 +2647,7 @@ static int pxp_2d_task_config(struct pxp_pixmap *input,
pxp_fetch_config(input, position);
break;
case PXP_2D_CSC1:
- pxp_csc1_config(input, false);
+ pxp_csc1_config(input, true);
break;
case PXP_2D_ROTATION1:
pxp_rotation1_config(input);
@@ -3217,8 +3217,8 @@ static int convert_param_to_pixmap(struct pxp_pixmap *pixmap,
pixmap->height = param->height;
pixmap->format = param->pixel_fmt;
pixmap->paddr = param->paddr;
- pixmap->pitch = param->stride;
pixmap->bpp = get_bpp_from_fmt(pixmap->format);
+ pixmap->pitch = param->width * pixmap->bpp >> 3;
pixmap->crop.x = param->left;
pixmap->crop.y = param->top;