Skip to content

Commit 9c24d68

Browse files
committed
gpu: ipu-cpmem: remove unused ipu_cpmem_set_yuv_planar function
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>
1 parent f2fa353 commit 9c24d68

2 files changed

Lines changed: 0 additions & 38 deletions

File tree

‎drivers/gpu/ipu-v3/ipu-cpmem.c‎

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -417,42 +417,6 @@ void ipu_cpmem_set_yuv_planar_full(struct ipuv3_channel *ch,
417417
}
418418
EXPORT_SYMBOL_GPL(ipu_cpmem_set_yuv_planar_full);
419419

420-
void ipu_cpmem_set_yuv_planar(struct ipuv3_channel *ch,
421-
u32 pixel_format, int stride, int height)
422-
{
423-
int fourcc, u_offset, v_offset;
424-
int uv_stride = 0;
425-
426-
fourcc = v4l2_pix_fmt_to_drm_fourcc(pixel_format);
427-
switch (fourcc) {
428-
case DRM_FORMAT_YUV420:
429-
uv_stride = stride / 2;
430-
u_offset = stride * height;
431-
v_offset = u_offset + (uv_stride * height / 2);
432-
break;
433-
case DRM_FORMAT_YVU420:
434-
uv_stride = stride / 2;
435-
v_offset = stride * height;
436-
u_offset = v_offset + (uv_stride * height / 2);
437-
break;
438-
case DRM_FORMAT_YUV422:
439-
uv_stride = stride / 2;
440-
u_offset = stride * height;
441-
v_offset = u_offset + (uv_stride * height);
442-
break;
443-
case DRM_FORMAT_NV12:
444-
case DRM_FORMAT_NV16:
445-
uv_stride = stride;
446-
u_offset = stride * height;
447-
v_offset = 0;
448-
break;
449-
default:
450-
return;
451-
}
452-
ipu_cpmem_set_yuv_planar_full(ch, uv_stride, u_offset, v_offset);
453-
}
454-
EXPORT_SYMBOL_GPL(ipu_cpmem_set_yuv_planar);
455-
456420
static const struct ipu_rgb def_xrgb_32 = {
457421
.red = { .offset = 16, .length = 8, },
458422
.green = { .offset = 8, .length = 8, },

‎include/video/imx-ipu-v3.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,6 @@ void ipu_cpmem_set_yuv_planar_full(struct ipuv3_channel *ch,
247247
unsigned int uv_stride,
248248
unsigned int u_offset,
249249
unsigned int v_offset);
250-
void ipu_cpmem_set_yuv_planar(struct ipuv3_channel *ch,
251-
u32 pixel_format, int stride, int height);
252250
int ipu_cpmem_set_fmt(struct ipuv3_channel *ch, u32 drm_fourcc);
253251
int ipu_cpmem_set_image(struct ipuv3_channel *ch, struct ipu_image *image);
254252
void ipu_cpmem_dump(struct ipuv3_channel *ch);

0 commit comments

Comments
 (0)