WSL2-Linux-Kernel/drivers/gpu/ipu-v3
Steve Longerbeam cd98e85a6b gpu: ipu-v3: Add queued image conversion support
This patch implements image conversion support using the IC tasks, with
tiling to support scaling to and from images up to 4096x4096. Image
rotation is also supported. Image conversion requests are added to
a run queue under the IC tasks.

The internal API is subsystem agnostic (no V4L2 dependency except
for the use of V4L2 fourcc pixel formats).

Callers prepare for image conversion by calling
ipu_image_convert_prepare(), which initializes the parameters of
the conversion. The caller passes in the ipu and IC task to use for
the conversion, the input and output image formats, a rotation mode,
and a completion callback and completion context pointer:

struct ipu_image_converter_ctx *
ipu_image_convert_prepare(struct ipu_soc *ipu, enum ipu_ic_task ic_task,
                          struct ipu_image *in, struct ipu_image *out,
                          enum ipu_rotate_mode rot_mode,
                          ipu_image_converter_cb_t complete,
                          void *complete_context);

A new conversion context is created that is added to an IC task
context queue. The caller is given the new conversion context,
which can then be passed to the further APIs:

int ipu_image_convert_queue(struct ipu_image_converter_run *run);

This queues the given image conversion request run to a run queue,
and starts the conversion immediately if the run queue is empty. Only
the physaddr's of the input and output image buffers are needed,
since the conversion context was created previously with
ipu_image_convert_prepare(). When the conversion completes, the run
pointer is returned to the completion callback.

void ipu_image_convert_abort(struct ipu_image_converter_ctx *ctx);

This will abort any active or pending conversions for this context.
Any currently active or pending runs belonging to this context are
returned via the completion callback with an error status.

void ipu_image_convert_unprepare(struct ipu_image_converter_ctx *ctx);

Unprepares the conversion context. Any active or pending runs will
be aborted by calling ipu_image_convert_abort().

Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2016-09-19 08:30:27 +02:00
..
Kconfig gpu: ipu-v3: Kconfig: Remove SOC_IMX6SL from IMX_IPUV3_CORE Kconfig 2014-09-24 23:50:25 +02:00
Makefile gpu: ipu-v3: Add queued image conversion support 2016-09-19 08:30:27 +02:00
ipu-common.c gpu: ipu-v3: Add queued image conversion support 2016-09-19 08:30:27 +02:00
ipu-cpmem.c gpu: ipu-cpmem: Add ipu_cpmem_get_burstsize() 2016-08-08 11:44:20 +02:00
ipu-csi.c gpu: ipu-v3: Fix CSI data format for 16-bit media bus formats 2016-08-08 11:44:20 +02:00
ipu-dc.c gpu: ipu-v3: ipu-dc: don't bug out on invalid bus_format 2016-07-12 18:26:05 +02:00
ipu-di.c drm/imx: atomic phase 1: Use transitional atomic CRTC and plane helpers 2016-07-12 18:23:47 +02:00
ipu-dmfc.c gpu: ipu-v3: Do not wait for DMFC FIFO to clear when disabling DMFC channel 2016-08-29 12:45:05 +02:00
ipu-dp.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-06-12 11:32:30 -07:00
ipu-ic.c gpu: ipu-v3: Add ipu_rot_mode_is_irt() 2016-09-19 08:30:14 +02:00
ipu-image-convert.c gpu: ipu-v3: Add queued image conversion support 2016-09-19 08:30:27 +02:00
ipu-prv.h gpu: ipu-v3: Add queued image conversion support 2016-09-19 08:30:27 +02:00
ipu-smfc.c IPUv3 fixes for v3.18 2014-10-07 14:31:14 +10:00
ipu-vdi.c gpu: ipu-v3: Add Video Deinterlacer unit 2016-08-29 16:30:11 +02:00