From: Jacopo Mondi <jacopo+renesas@jmondi.org>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: "Jacopo Mondi" <jacopo+renesas@jmondi.org>,
"Kieran Bingham" <kieran.bingham+renesas@ideasonboard.com>,
"Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>,
"Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>,
linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: [PATCH v2 0/4] media: Introduce post_register() subdev operation
Date: Wed, 7 Jul 2021 17:19:59 +0200 [thread overview]
Message-ID: <20210707152003.136272-1-jacopo+renesas@jmondi.org> (raw)
Hello, this series adds a new core operation to the v4l2 subdev ops to allow
deferring part of the initialization sequence to a later point in time.
I'll copy the commit message of the now superseded patch that was using the
deprecated init() subdev operation to achieve the same result
------------------------------------------------------------------------------
The current probe() procedure of the RDACM20 and RDACM21 GMSL cameras is
performed with the embedded MAX9271 serializer's noise immunity
threshold disabled. Once the camera has been initialized by probing the
embedded chips, the threshold is enabled and then compensated on the
deserializer's side by increasing the reverse channel signal amplitude
once all cameras have bound.
The probe routine is thus run without noise immunity activated which
in noisy environment conditions makes the probe sequence less reliable as
the chips configuration requires a relatively high amount of i2c
transactions.
Break chip initialization in two:
- At probe time only configure the serializer's reverse channel with
noise immunity activated, to reduce the number of transactions
performed without noise immunity protection enabled
- Move the chips initialization to the .post_register() core subdev operation
called by the deserializer after all camera have probed and
have increased their noise immunity threshold
The initialization routine looks like the following:
MAX9286 RDACM20/21
probe()
|
---------------------> |
probe() {
enable_threshold()
}
|<--------------------|
v4l2 async bound {
compensate_amplitude()
call post_register()
|-------------------->|
init() {
access camera registers()
}
|<-------------------
}
-------------------------------------------------------------------------------
The usage of post_register() is opt-in. The receiver should explicitly require
to be in control of calling post_register() by setting the newly introduced
V4L2_ASYNC_NOTIFIER_DEFER_POST_REGISTER flag.
If the receiver does not specify such flag, post_registered() is called by the
core just after the subdevice has been registered.
Thanks
j
Jacopo Mondi (4):
media: v4l2-subdev: Introduce post_register() core op
media: v4l2-async: Add notifier flags
media: v4l2-async: Call post_register() subdev op
media: i2c: gmsl: Defer camera initialization
drivers/media/i2c/max9286.c | 21 ++++++--
drivers/media/i2c/rdacm20.c | 81 ++++++++++++++++------------
drivers/media/i2c/rdacm21.c | 73 ++++++++++++++-----------
drivers/media/v4l2-core/v4l2-async.c | 11 ++++
include/media/v4l2-async.h | 10 ++++
include/media/v4l2-subdev.h | 3 ++
6 files changed, 130 insertions(+), 69 deletions(-)
--
2.32.0
next reply other threads:[~2021-07-07 15:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 15:19 Jacopo Mondi [this message]
2021-07-07 15:20 ` [PATCH v2 1/4] media: v4l2-subdev: Introduce post_register() core op Jacopo Mondi
2021-07-07 15:20 ` [PATCH v2 2/4] media: v4l2-async: Add notifier flags Jacopo Mondi
2021-07-07 15:20 ` [PATCH v2 3/4] media: v4l2-async: Call post_register() subdev op Jacopo Mondi
2021-07-07 15:20 ` [PATCH v2 4/4] media: i2c: gmsl: Defer camera initialization Jacopo Mondi
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=20210707152003.136272-1-jacopo+renesas@jmondi.org \
--to=jacopo+renesas@jmondi.org \
--cc=hverkuil-cisco@xs4all.nl \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
/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).