diff mbox

[06/10] gpu: ipu-cpmem: remove unused ipu_cpmem_set_yuv_planar function

Message ID 1476872477-29493-6-git-send-email-p.zabel@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Philipp Zabel Oct. 19, 2016, 10:21 a.m. UTC
ipu_cpmem_set_yuv_planar_full is only used directly, remove the wrapper.

Suggested-by: Liu Ying <gnuiyl@gmail.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/gpu/ipu-v3/ipu-cpmem.c | 36 ------------------------------------
 include/video/imx-ipu-v3.h     |  2 --
 2 files changed, 38 deletions(-)

Comments

Ying Liu Oct. 20, 2016, 6:20 a.m. UTC | #1
On Wed, Oct 19, 2016 at 6:21 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> ipu_cpmem_set_yuv_planar_full is only used directly, remove the wrapper.
>
> Suggested-by: Liu Ying <gnuiyl@gmail.com>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>

Acked-by: Liu Ying <gnuiyl@gmail.com>

> ---
>  drivers/gpu/ipu-v3/ipu-cpmem.c | 36 ------------------------------------
>  include/video/imx-ipu-v3.h     |  2 --
>  2 files changed, 38 deletions(-)
>
> diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c
> index fcb7dc8..f3ca1d6 100644
> --- a/drivers/gpu/ipu-v3/ipu-cpmem.c
> +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c
> @@ -417,42 +417,6 @@ void ipu_cpmem_set_yuv_planar_full(struct ipuv3_channel *ch,
>  }
>  EXPORT_SYMBOL_GPL(ipu_cpmem_set_yuv_planar_full);
>
> -void ipu_cpmem_set_yuv_planar(struct ipuv3_channel *ch,
> -                             u32 pixel_format, int stride, int height)
> -{
> -       int fourcc, u_offset, v_offset;
> -       int uv_stride = 0;
> -
> -       fourcc = v4l2_pix_fmt_to_drm_fourcc(pixel_format);
> -       switch (fourcc) {
> -       case DRM_FORMAT_YUV420:
> -               uv_stride = stride / 2;
> -               u_offset = stride * height;
> -               v_offset = u_offset + (uv_stride * height / 2);
> -               break;
> -       case DRM_FORMAT_YVU420:
> -               uv_stride = stride / 2;
> -               v_offset = stride * height;
> -               u_offset = v_offset + (uv_stride * height / 2);
> -               break;
> -       case DRM_FORMAT_YUV422:
> -               uv_stride = stride / 2;
> -               u_offset = stride * height;
> -               v_offset = u_offset + (uv_stride * height);
> -               break;
> -       case DRM_FORMAT_NV12:
> -       case DRM_FORMAT_NV16:
> -               uv_stride = stride;
> -               u_offset = stride * height;
> -               v_offset = 0;
> -               break;
> -       default:
> -               return;
> -       }
> -       ipu_cpmem_set_yuv_planar_full(ch, uv_stride, u_offset, v_offset);
> -}
> -EXPORT_SYMBOL_GPL(ipu_cpmem_set_yuv_planar);
> -
>  static const struct ipu_rgb def_xrgb_32 = {
>         .red    = { .offset = 16, .length = 8, },
>         .green  = { .offset =  8, .length = 8, },
> diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
> index 173073e..cc8174c 100644
> --- a/include/video/imx-ipu-v3.h
> +++ b/include/video/imx-ipu-v3.h
> @@ -247,8 +247,6 @@ void ipu_cpmem_set_yuv_planar_full(struct ipuv3_channel *ch,
>                                    unsigned int uv_stride,
>                                    unsigned int u_offset,
>                                    unsigned int v_offset);
> -void ipu_cpmem_set_yuv_planar(struct ipuv3_channel *ch,
> -                             u32 pixel_format, int stride, int height);
>  int ipu_cpmem_set_fmt(struct ipuv3_channel *ch, u32 drm_fourcc);
>  int ipu_cpmem_set_image(struct ipuv3_channel *ch, struct ipu_image *image);
>  void ipu_cpmem_dump(struct ipuv3_channel *ch);
> --
> 2.9.3
>
diff mbox

Patch

diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c
index fcb7dc8..f3ca1d6 100644
--- a/drivers/gpu/ipu-v3/ipu-cpmem.c
+++ b/drivers/gpu/ipu-v3/ipu-cpmem.c
@@ -417,42 +417,6 @@  void ipu_cpmem_set_yuv_planar_full(struct ipuv3_channel *ch,
 }
 EXPORT_SYMBOL_GPL(ipu_cpmem_set_yuv_planar_full);
 
-void ipu_cpmem_set_yuv_planar(struct ipuv3_channel *ch,
-			      u32 pixel_format, int stride, int height)
-{
-	int fourcc, u_offset, v_offset;
-	int uv_stride = 0;
-
-	fourcc = v4l2_pix_fmt_to_drm_fourcc(pixel_format);
-	switch (fourcc) {
-	case DRM_FORMAT_YUV420:
-		uv_stride = stride / 2;
-		u_offset = stride * height;
-		v_offset = u_offset + (uv_stride * height / 2);
-		break;
-	case DRM_FORMAT_YVU420:
-		uv_stride = stride / 2;
-		v_offset = stride * height;
-		u_offset = v_offset + (uv_stride * height / 2);
-		break;
-	case DRM_FORMAT_YUV422:
-		uv_stride = stride / 2;
-		u_offset = stride * height;
-		v_offset = u_offset + (uv_stride * height);
-		break;
-	case DRM_FORMAT_NV12:
-	case DRM_FORMAT_NV16:
-		uv_stride = stride;
-		u_offset = stride * height;
-		v_offset = 0;
-		break;
-	default:
-		return;
-	}
-	ipu_cpmem_set_yuv_planar_full(ch, uv_stride, u_offset, v_offset);
-}
-EXPORT_SYMBOL_GPL(ipu_cpmem_set_yuv_planar);
-
 static const struct ipu_rgb def_xrgb_32 = {
 	.red	= { .offset = 16, .length = 8, },
 	.green	= { .offset =  8, .length = 8, },
diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h
index 173073e..cc8174c 100644
--- a/include/video/imx-ipu-v3.h
+++ b/include/video/imx-ipu-v3.h
@@ -247,8 +247,6 @@  void ipu_cpmem_set_yuv_planar_full(struct ipuv3_channel *ch,
 				   unsigned int uv_stride,
 				   unsigned int u_offset,
 				   unsigned int v_offset);
-void ipu_cpmem_set_yuv_planar(struct ipuv3_channel *ch,
-			      u32 pixel_format, int stride, int height);
 int ipu_cpmem_set_fmt(struct ipuv3_channel *ch, u32 drm_fourcc);
 int ipu_cpmem_set_image(struct ipuv3_channel *ch, struct ipu_image *image);
 void ipu_cpmem_dump(struct ipuv3_channel *ch);