MLK-15325: pxp-v3: Modify pxp pitch parameter and csc
authorGuoniu.Zhou <guoniu.zhou@nxp.com>
Wed, 5 Jul 2017 04:20:33 +0000 (12:20 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:33:32 +0000 (15:33 -0500)
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>
drivers/dma/pxp/pxp_dma_v3.c

index 37d63f0..8d2e10e 100644 (file)
@@ -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;