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

Source file repositories/reference/linux-study-clean/include/video/imx-ipu-image-convert.h

File Facts

System
Linux kernel
Corpus path
include/video/imx-ipu-image-convert.h
Extension
.h
Size
5805 bytes
Lines
173
Domain
Repository Root And Misc
Bucket
include
Inferred role
Repository Root And Misc: implementation source
Status
source implementation candidate

Why This File Exists

Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ipu_image_convert_run {
	struct ipu_image_convert_ctx *ctx;

	dma_addr_t in_phys;
	dma_addr_t out_phys;

	int status;

	/* private: */
	/* internal to image converter, callers don't touch */
	struct list_head list;
};

/**
 * typedef ipu_image_convert_cb_t - conversion callback function prototype
 *
 * @run:	the completed conversion run pointer
 * @ctx:	a private context pointer for the callback
 */
typedef void (*ipu_image_convert_cb_t)(struct ipu_image_convert_run *run,
				       void *ctx);

/**
 * ipu_image_convert_adjust() - adjust input/output images to IPU restrictions.
 *
 * @in:		input image format, adjusted on return
 * @out:	output image format, adjusted on return
 * @rot_mode:	rotation mode
 *
 * In V4L2, drivers can call ipu_image_convert_adjust() in .try_fmt.
 */
void ipu_image_convert_adjust(struct ipu_image *in, struct ipu_image *out,
			      enum ipu_rotate_mode rot_mode);

/**
 * ipu_image_convert_verify() - verify that input/output image formats
 *         and rotation mode meet IPU restrictions.
 *
 * @in:		input image format
 * @out:	output image format
 * @rot_mode:	rotation mode
 *
 * Returns: 0 if the formats and rotation mode meet IPU restrictions,
 * -EINVAL otherwise.
 */
int ipu_image_convert_verify(struct ipu_image *in, struct ipu_image *out,
			     enum ipu_rotate_mode rot_mode);

/**
 * ipu_image_convert_prepare() - prepare a conversion context.
 *
 * @ipu:	the IPU handle to use for the conversions
 * @ic_task:	the IC task to use for the conversions
 * @in:		input image format
 * @out:	output image format
 * @rot_mode:	rotation mode
 * @complete:	run completion callback
 * @complete_context:	a context pointer for the completion callback
 *
 * In V4L2, drivers should call ipu_image_convert_prepare() at streamon.
 *
 * Returns: an opaque conversion context pointer on success, error pointer
 * on failure. The input/output formats and rotation mode must already meet
 * IPU retrictions.
 */
struct ipu_image_convert_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_convert_cb_t complete,
			  void *complete_context);

/**
 * ipu_image_convert_unprepare() - unprepare a conversion context.
 *
 * @ctx: the conversion context pointer to unprepare
 *
 * Aborts any active or pending conversions for this context and
 * frees the context. Any currently active or pending runs belonging
 * to this context are returned via the completion callback with an
 * error run status.
 *
 * In V4L2, drivers should call ipu_image_convert_unprepare() at
 * streamoff.
 */
void ipu_image_convert_unprepare(struct ipu_image_convert_ctx *ctx);

/**
 * ipu_image_convert_queue() - queue a conversion run
 *

Annotation

Implementation Notes