Hi Steve,
thanks for the update.
Am Mittwoch, den 14.09.2016, 18:45 -0700 schrieb Steve Longerbeam:
I added comment headers for all the image conversion prototypes.I think that is the right place already. imx-image-convert.h could be
It caused bloat in imx-ipu-v3.h, so I moved it to a new header:
include/video/imx-image-convert.h, but let me know if we should put
this somewhere else and/or under Documentation/ somewhere.
renamed to imx-ipu-image-convert.h, to make clear that this is about the
IPU image converter.
Let's use hardware minimum in the low level code. Sane defaults are forNowhere really :) This is just some sane minimums, to pass+#define MIN_W 128Where does this minimum come from?
+#define MIN_H 128
to clamp_align() when aligning input/output width/height in
ipu_image_convert_adjust().
the V4L2 API. Would that be 8x2 pixels per input tile?
There is nothing wrong with acquiring the irq. It could still beBecause (see above), all the IPU resources that might be needed+ if (ipu_rot_mode_is_irt(ctx->rot_mode)) {Why enable the out_chan EOF irq at all when using the IRT mode?
+ /* this is a rotation operation, just ignore */
+ spin_unlock_irqrestore(&cvt->irqlock, flags);
+ return IRQ_HANDLED;
+ }
for any conversion context that is queued to a image conversion
channel (IC task) are acquired when the first context is queued,
including rotation resources. So by acquiring the non-rotation EOF
irq, it will get fielded even for rotation conversions, so we have to
handle it.
disabled while it is not needed.
I'd prefer to move this into the mem2mem driver try_format, then.ipu_image_convert_adjust() is meant to be called by v4l2 try_format(),+/* Adjusts input/output images to IPU restrictions */Is this our task at all?
+int ipu_image_convert_adjust(struct ipu_image *in, struct ipu_image *out,
+ enum ipu_rotate_mode rot_mode)
+{
+ const struct ipu_ic_pixfmt *infmt, *outfmt;
+ unsigned int num_in_rows, num_in_cols;
+ unsigned int num_out_rows, num_out_cols;
+ u32 w_align, h_align;
+
+ infmt = ipu_ic_get_format(in->pix.pixelformat);
+ outfmt = ipu_ic_get_format(out->pix.pixelformat);
+
+ /* set some defaults if needed */
which should never return EINVAL but should return a supported format
when the passed format is not supported. So I added this here to return
some default pixel formats and width/heights if needed.