From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
Mark Brown <broonie@kernel.org>,
linux-media@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 3/6] media: platform: visconti: Add Toshiba Visconti Video Input Interface driver user interace
Date: Wed, 18 Jan 2023 03:04:20 +0200 [thread overview]
Message-ID: <Y8dFlFkVJS/6+Ib1@pendragon.ideasonboard.com> (raw)
In-Reply-To: <2b412539-2236-b41f-c777-bc9e9cf99d66@xs4all.nl>
Hello,
On Tue, Jan 17, 2023 at 12:47:10PM +0100, Hans Verkuil wrote:
> More comments below:
>
> On 11/01/2023 03:24, Yuji Ishikawa wrote:
> > Add support to Video Input Interface on Toshiba Visconti ARM SoCs.
> > The interface device includes CSI2 Receiver,
> > frame grabber, video DMAC and image signal processor.
> > This patch provides the user interface layer.
> >
> > A driver instance provides three /dev/videoX device files;
> > one for RGB image capture, another one for optional RGB capture
> > with different parameters and the last one for RAW capture.
> >
> > Through the device files, the driver provides streaming (DMA-BUF) interface.
> > A userland application should feed DMA-BUF instances for capture buffers.
> >
> > The driver is based on media controller framework.
> > Its operations are roughly mapped to two subdrivers;
> > one for ISP and CSI2 receiver (yields 1 instance),
> > the other for capture (yields 3 instances for each capture mode).
> >
> > Signed-off-by: Yuji Ishikawa <yuji2.ishikawa@toshiba.co.jp>
> > ---
> > Changelog v2:
> > - Resend v1 because a patch exceeds size limit.
> >
> > Changelog v3:
> > - Adapted to media control framework
> > - Introduced ISP subdevice, capture device
> > - Remove private IOCTLs and add vendor specific V4L2 controls
> > - Change function name avoiding camelcase and uppercase letters
> >
> > Changelog v4:
> > - Split patches because the v3 patch exceeds size limit
> > - Stop using ID number to identify driver instance:
> > - Use dynamically allocated structure to hold HW specific context,
> > instead of static one.
> > - Call HW layer functions with the context structure instead of ID number
> > - Use pm_runtime to trigger initialization of HW
> > along with open/close of device files.
> >
> > Changelog v5:
> > - Fix coding style problems in viif.c
> > ---
> > drivers/media/platform/visconti/Makefile | 1 +
> > drivers/media/platform/visconti/viif.c | 545 ++++++++
> > drivers/media/platform/visconti/viif.h | 203 +++
> > .../media/platform/visconti/viif_capture.c | 1201 +++++++++++++++++
> > drivers/media/platform/visconti/viif_isp.c | 846 ++++++++++++
> > 5 files changed, 2796 insertions(+)
> > create mode 100644 drivers/media/platform/visconti/viif.c
> > create mode 100644 drivers/media/platform/visconti/viif.h
> > create mode 100644 drivers/media/platform/visconti/viif_capture.c
> > create mode 100644 drivers/media/platform/visconti/viif_isp.c
[snip]
> > +static int viif_s_edid(struct file *file, void *fh, struct v4l2_edid *edid)
> > +{
> > + struct viif_device *viif_dev = video_drvdata_to_capdev(file)->viif_dev;
> > + struct viif_subdev *viif_sd = viif_dev->sd;
> > +
> > + return v4l2_subdev_call(viif_sd->v4l2_sd, pad, set_edid, edid);
> > +}
>
> Has this driver been tested with an HDMI receiver? If not, then I would recommend
> dropping support for it until you actually can test with such hardware.
>
> The DV_TIMINGS API is for HDMI/DVI/DisplayPort etc. interfaces, it's not meant
> for CSI and similar interfaces.
More than that, for MC-based drivers, the video node should *never*
forward ioctls to a connected subdev. The *only* valid calls to
v4l2_subdev_call() in this file are
- to video.s_stream() in the start and stop streaming handler
- to pad.g_fmt() when starting streaming to validate that the connected
subdev outputs a format compatible with the format set on the video
capture device
That's it, nothing else, all other calls to v4l2_subdev_call() must be
dropped from the implementation of the video_device.
[snip]
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2023-01-18 1:10 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 2:24 [PATCH v5 0/6] Add Toshiba Visconti Video Input Interface driver Yuji Ishikawa
2023-01-11 2:24 ` [PATCH v5 1/6] dt-bindings: media: platform: visconti: Add Toshiba Visconti Video Input Interface bindings Yuji Ishikawa
2023-01-11 9:19 ` Krzysztof Kozlowski
2023-01-11 12:48 ` yuji2.ishikawa
2023-01-17 15:26 ` Laurent Pinchart
2023-01-17 15:42 ` Krzysztof Kozlowski
2023-01-17 15:58 ` Laurent Pinchart
2023-01-17 17:01 ` Krzysztof Kozlowski
2023-01-22 19:25 ` Laurent Pinchart
2023-01-30 9:06 ` yuji2.ishikawa
2023-02-01 9:45 ` Laurent Pinchart
2023-02-01 11:24 ` yuji2.ishikawa
2023-01-11 2:24 ` [PATCH v5 2/6] media: platform: visconti: Add Toshiba Visconti Video Input Interface driver Yuji Ishikawa
2023-01-11 15:30 ` kernel test robot
2023-01-11 22:55 ` kernel test robot
2023-01-17 10:01 ` Hans Verkuil
2023-01-25 12:12 ` yuji2.ishikawa
2023-01-17 22:39 ` Sakari Ailus
2023-02-01 2:02 ` yuji2.ishikawa
2023-02-01 9:41 ` Laurent Pinchart
2023-02-01 11:22 ` yuji2.ishikawa
2023-01-18 0:52 ` Laurent Pinchart
2023-02-02 4:37 ` yuji2.ishikawa
2023-01-11 2:24 ` [PATCH v5 3/6] media: platform: visconti: Add Toshiba Visconti Video Input Interface driver user interace Yuji Ishikawa
2023-01-17 11:47 ` Hans Verkuil
2023-01-18 1:04 ` Laurent Pinchart [this message]
2023-01-25 10:20 ` yuji2.ishikawa
2023-01-26 20:49 ` Laurent Pinchart
2023-02-02 4:52 ` yuji2.ishikawa
2023-02-02 7:58 ` Laurent Pinchart
2023-01-26 1:25 ` yuji2.ishikawa
2023-01-26 8:01 ` Hans Verkuil
2023-01-27 12:47 ` yuji2.ishikawa
2023-01-11 2:24 ` [PATCH v5 4/6] media: platform: visconti: Add Toshiba Visconti Video Input Interface driver v4l2 controls handler Yuji Ishikawa
2023-01-17 11:19 ` Hans Verkuil
2023-01-26 0:38 ` yuji2.ishikawa
2023-01-26 8:39 ` Hans Verkuil
2023-01-26 11:35 ` Laurent Pinchart
2023-02-03 1:35 ` yuji2.ishikawa
2023-02-02 12:42 ` yuji2.ishikawa
2023-01-11 2:24 ` [PATCH v5 5/6] documentation: media: add documentation for Toshiba Visconti Video Input Interface driver Yuji Ishikawa
2023-01-11 2:24 ` [PATCH v5 6/6] MAINTAINERS: Add entries for Toshiba Visconti Video Input Interface Yuji Ishikawa
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=Y8dFlFkVJS/6+Ib1@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil@xs4all.nl \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nobuhiro1.iwamatsu@toshiba.co.jp \
--cc=rafael.j.wysocki@intel.com \
--cc=robh+dt@kernel.org \
--cc=yuji2.ishikawa@toshiba.co.jp \
/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;
as well as URLs for NNTP newsgroup(s).