Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpu: ipu-v3: Remove unused ipu_image_convert_* functions

ipu_image_convert_enum_format() and ipu_image_convert_sync() were both
added in 2016 by
commit cd98e85a6b78 ("gpu: ipu-v3: Add queued image conversion support")

but have remained unused.

Remove them.

ipu_image_convert_sync() was the last user of
image_convert_sync_complete().

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241226022752.219399-5-linux@treblig.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

authored by

Dr. David Alan Gilbert and committed by
Dmitry Baryshkov
96e9d754 4f9c64e9

-80
-48
drivers/gpu/ipu-v3/ipu-image-convert.c
··· 355 355 (ic_image->fmt->fourcc >> 24) & 0xff); 356 356 } 357 357 358 - int ipu_image_convert_enum_format(int index, u32 *fourcc) 359 - { 360 - const struct ipu_image_pixfmt *fmt; 361 - 362 - if (index >= (int)ARRAY_SIZE(image_convert_formats)) 363 - return -EINVAL; 364 - 365 - /* Format found */ 366 - fmt = &image_convert_formats[index]; 367 - *fourcc = fmt->fourcc; 368 - return 0; 369 - } 370 - EXPORT_SYMBOL_GPL(ipu_image_convert_enum_format); 371 - 372 358 static void free_dma_buf(struct ipu_image_convert_priv *priv, 373 359 struct ipu_image_convert_dma_buf *buf) 374 360 { ··· 2422 2436 return run; 2423 2437 } 2424 2438 EXPORT_SYMBOL_GPL(ipu_image_convert); 2425 - 2426 - /* "Canned" synchronous single image conversion */ 2427 - static void image_convert_sync_complete(struct ipu_image_convert_run *run, 2428 - void *data) 2429 - { 2430 - struct completion *comp = data; 2431 - 2432 - complete(comp); 2433 - } 2434 - 2435 - int ipu_image_convert_sync(struct ipu_soc *ipu, enum ipu_ic_task ic_task, 2436 - struct ipu_image *in, struct ipu_image *out, 2437 - enum ipu_rotate_mode rot_mode) 2438 - { 2439 - struct ipu_image_convert_run *run; 2440 - struct completion comp; 2441 - int ret; 2442 - 2443 - init_completion(&comp); 2444 - 2445 - run = ipu_image_convert(ipu, ic_task, in, out, rot_mode, 2446 - image_convert_sync_complete, &comp); 2447 - if (IS_ERR(run)) 2448 - return PTR_ERR(run); 2449 - 2450 - ret = wait_for_completion_timeout(&comp, msecs_to_jiffies(10000)); 2451 - ret = (ret == 0) ? -ETIMEDOUT : 0; 2452 - 2453 - ipu_image_convert_unprepare(run->ctx); 2454 - kfree(run); 2455 - 2456 - return ret; 2457 - } 2458 - EXPORT_SYMBOL_GPL(ipu_image_convert_sync); 2459 2439 2460 2440 int ipu_image_convert_init(struct ipu_soc *ipu, struct device *dev) 2461 2441 {
-32
include/video/imx-ipu-image-convert.h
··· 41 41 void *ctx); 42 42 43 43 /** 44 - * ipu_image_convert_enum_format() - enumerate the image converter's 45 - * supported input and output pixel formats. 46 - * 47 - * @index: pixel format index 48 - * @fourcc: v4l2 fourcc for this index 49 - * 50 - * Returns 0 with a valid index and fills in v4l2 fourcc, -EINVAL otherwise. 51 - * 52 - * In V4L2, drivers can call ipu_image_enum_format() in .enum_fmt. 53 - */ 54 - int ipu_image_convert_enum_format(int index, u32 *fourcc); 55 - 56 - /** 57 44 * ipu_image_convert_adjust() - adjust input/output images to IPU restrictions. 58 45 * 59 46 * @in: input image format, adjusted on return ··· 162 175 enum ipu_rotate_mode rot_mode, 163 176 ipu_image_convert_cb_t complete, 164 177 void *complete_context); 165 - 166 - /** 167 - * ipu_image_convert_sync() - synchronous single image conversion request 168 - * 169 - * @ipu: the IPU handle to use for the conversion 170 - * @ic_task: the IC task to use for the conversion 171 - * @in: input image format 172 - * @out: output image format 173 - * @rot_mode: rotation mode 174 - * 175 - * Carry out a single image conversion. Returns when the conversion 176 - * completes. The input/output formats and rotation mode must already 177 - * meet IPU retrictions. The created context is automatically unprepared 178 - * and the run freed on return. 179 - */ 180 - int ipu_image_convert_sync(struct ipu_soc *ipu, enum ipu_ic_task ic_task, 181 - struct ipu_image *in, struct ipu_image *out, 182 - enum ipu_rotate_mode rot_mode); 183 - 184 178 185 179 #endif /* __IMX_IPU_IMAGE_CONVERT_H__ */