Skip to content

Commit 96e9d75

Browse files
Dr. David Alan Gilbertlumag
authored andcommitted
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 cd98e85 ("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 <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 4f9c64e commit 96e9d75

File tree

2 files changed

+0
-80
lines changed

2 files changed

+0
-80
lines changed

drivers/gpu/ipu-v3/ipu-image-convert.c

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -355,20 +355,6 @@ static void dump_format(struct ipu_image_convert_ctx *ctx,
355355
(ic_image->fmt->fourcc >> 24) & 0xff);
356356
}
357357

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-
372358
static void free_dma_buf(struct ipu_image_convert_priv *priv,
373359
struct ipu_image_convert_dma_buf *buf)
374360
{
@@ -2437,40 +2423,6 @@ ipu_image_convert(struct ipu_soc *ipu, enum ipu_ic_task ic_task,
24372423
}
24382424
EXPORT_SYMBOL_GPL(ipu_image_convert);
24392425

2440-
/* "Canned" synchronous single image conversion */
2441-
static void image_convert_sync_complete(struct ipu_image_convert_run *run,
2442-
void *data)
2443-
{
2444-
struct completion *comp = data;
2445-
2446-
complete(comp);
2447-
}
2448-
2449-
int ipu_image_convert_sync(struct ipu_soc *ipu, enum ipu_ic_task ic_task,
2450-
struct ipu_image *in, struct ipu_image *out,
2451-
enum ipu_rotate_mode rot_mode)
2452-
{
2453-
struct ipu_image_convert_run *run;
2454-
struct completion comp;
2455-
int ret;
2456-
2457-
init_completion(&comp);
2458-
2459-
run = ipu_image_convert(ipu, ic_task, in, out, rot_mode,
2460-
image_convert_sync_complete, &comp);
2461-
if (IS_ERR(run))
2462-
return PTR_ERR(run);
2463-
2464-
ret = wait_for_completion_timeout(&comp, msecs_to_jiffies(10000));
2465-
ret = (ret == 0) ? -ETIMEDOUT : 0;
2466-
2467-
ipu_image_convert_unprepare(run->ctx);
2468-
kfree(run);
2469-
2470-
return ret;
2471-
}
2472-
EXPORT_SYMBOL_GPL(ipu_image_convert_sync);
2473-
24742426
int ipu_image_convert_init(struct ipu_soc *ipu, struct device *dev)
24752427
{
24762428
struct ipu_image_convert_priv *priv;

include/video/imx-ipu-image-convert.h

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,6 @@ struct ipu_image_convert_run {
4040
typedef void (*ipu_image_convert_cb_t)(struct ipu_image_convert_run *run,
4141
void *ctx);
4242

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-
5643
/**
5744
* ipu_image_convert_adjust() - adjust input/output images to IPU restrictions.
5845
*
@@ -176,23 +163,4 @@ ipu_image_convert(struct ipu_soc *ipu, enum ipu_ic_task ic_task,
176163
ipu_image_convert_cb_t complete,
177164
void *complete_context);
178165

179-
/**
180-
* ipu_image_convert_sync() - synchronous single image conversion request
181-
*
182-
* @ipu: the IPU handle to use for the conversion
183-
* @ic_task: the IC task to use for the conversion
184-
* @in: input image format
185-
* @out: output image format
186-
* @rot_mode: rotation mode
187-
*
188-
* Carry out a single image conversion. Returns when the conversion
189-
* completes. The input/output formats and rotation mode must already
190-
* meet IPU retrictions. The created context is automatically unprepared
191-
* and the run freed on return.
192-
*/
193-
int ipu_image_convert_sync(struct ipu_soc *ipu, enum ipu_ic_task ic_task,
194-
struct ipu_image *in, struct ipu_image *out,
195-
enum ipu_rotate_mode rot_mode);
196-
197-
198166
#endif /* __IMX_IPU_IMAGE_CONVERT_H__ */

0 commit comments

Comments
 (0)