From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
Cc: mchehab@kernel.org, hverkuil-cisco@xs4all.nl,
stanimir.varbanov@linaro.org, laurent.pinchart@ideasonboard.com,
tomi.valkeinen@ideasonboard.com, robh+dt@kernel.org,
nicolas@ndufresne.ca, linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
Xavier Roumegue <xavier.roumegue@oss.nxp.com>
Subject: Re: (EXT) [PATCH v3 8/9] media: dw100: Add i.MX8MP dw100 dewarper driver
Date: Thu, 10 Mar 2022 08:21:05 +0100 [thread overview]
Message-ID: <10066981.nUPlyArG6x@steina-w> (raw)
In-Reply-To: <20220308201038.48386-9-xavier.roumegue@oss.nxp.com>
Hello Xavier,
thanks for trying to mainline this hardware support.
Am Dienstag, 8. März 2022, 21:10:37 CET schrieb Xavier Roumegue:
> Add a V4L2 mem-to-mem driver for the Vivante DW100 Dewarp Processor IP
> core found on i.MX8MP SoC.
>
> The processor core applies a programmable geometrical transformation on
> input image to correct distorsion introduced by lenses.
> The transformation function is exposed as a grid map with 16x16 pixel
> macroblocks indexed using X, Y vertex coordinates.
>
> The dewarping map can be set from application through dedicated a v4l2
> control. If not set or invalid, the driver computes an identity map
> prior to start the processing engine.
>
> The driver supports scaling, cropping and pixel format conversion.
>
> Signed-off-by: Xavier Roumegue <xavier.roumegue@oss.nxp.com>
> ---
> [snip]
> diff --git a/drivers/media/platform/dw100/dw100.c
> b/drivers/media/platform/dw100/dw100.c new file mode 100644
> index 000000000000..7e1fcdfe5b91
> --- /dev/null
> +++ b/drivers/media/platform/dw100/dw100.c
> @@ -0,0 +1,1744 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * DW100 Hardware dewarper
> + *
> + * Copyright 2022 NXP
> + * Author: Xavier Roumegue (xavier.roumegue@oss.nxp.com)
> + *
> + */
> [snip]
> +static const struct v4l2_ctrl_config ctrl_custom_lut = {
> + .id = V4L2_CID_DW100_MAPPING,
> + .name = "Look-Up Table",
> + .type = V4L2_CTRL_TYPE_U32,
> + .min = 0x00000000,
> + .max = 0xFFFFFFFF,
> + .step = 1,
> + .def = 0,
> + .dims = { DW100_MAX_LUT_NELEMS },
> + .flags = V4L2_CTRL_FLAG_DYNAMIC_ARRAY,
> +};
I know right now there is only one control, but you are reserving 16 controls
in PATCH 5/9. So for me it seems sensible to make this an array already, so
that additional controls can be added here easily.
> [snip]
> + hdl = &ctx->hdl;
> + v4l2_ctrl_handler_init(hdl, 1);
> + v4l2_ctrl_new_custom(hdl, &ctrl_custom_lut, NULL);
IMHO this won't need any further changes if an array is already being used.
I'm eager to try it once you can provide an example how to use it.
Regards
Alexander
next prev parent reply other threads:[~2022-03-10 7:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-08 20:10 [PATCH v3 0/9] i.MX8MP DW100 dewarper driver Xavier Roumegue
2022-03-08 20:10 ` [PATCH v3 1/9] videodev2.h: add V4L2_CTRL_FLAG_DYNAMIC_ARRAY Xavier Roumegue
2022-03-08 20:10 ` [PATCH v3 2/9] v4l2-ctrls: add support for dynamically allocated arrays Xavier Roumegue
2022-03-08 20:10 ` [PATCH v3 3/9] vivid: add dynamic array test control Xavier Roumegue
2022-03-08 20:10 ` [PATCH v3 4/9] media: Documentation: dw100: Add user documentation for the DW100 driver Xavier Roumegue
2022-03-08 20:10 ` [PATCH v3 5/9] media: v4l: uapi: Add user control base for DW100 controls Xavier Roumegue
2022-03-08 20:10 ` [PATCH v3 6/9] media: uapi: Add a control for DW100 driver Xavier Roumegue
2022-03-08 20:10 ` [PATCH v3 7/9] media: dt-bindings: media: Add i.MX8MP DW100 binding Xavier Roumegue
2022-03-08 21:24 ` Rob Herring
2022-03-09 1:23 ` Rob Herring
2022-03-09 10:51 ` Xavier Roumegue (OSS)
2022-03-08 20:10 ` [PATCH v3 8/9] media: dw100: Add i.MX8MP dw100 dewarper driver Xavier Roumegue
2022-03-10 7:21 ` Alexander Stein [this message]
2022-03-10 16:18 ` (EXT) " Xavier Roumegue (OSS)
2022-03-08 20:10 ` [PATCH v3 9/9] media: MAINTAINERS: add entry for i.MX8MP DW100 v4l2 mem2mem driver Xavier Roumegue
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10066981.nUPlyArG6x@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nicolas@ndufresne.ca \
--cc=robh+dt@kernel.org \
--cc=stanimir.varbanov@linaro.org \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=xavier.roumegue@oss.nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox