All of lore.kernel.org
 help / color / mirror / Atom feed
From: jmondi <jacopo@jmondi.org>
To: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	laurent.pinchart@ideasonboard.com,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v1 09/12] media: rcar: vin: Install notifier for digital input
Date: Tue, 20 Jun 2017 09:32:29 +0200	[thread overview]
Message-ID: <20170620073229.GC27008@w540> (raw)
In-Reply-To: <20170619195114.GH11365@bigcity.dyn.berto.se>

Hi Niklas,

On Mon, Jun 19, 2017 at 09:51:15PM +0200, Niklas Söderlund wrote:
> Hi Jacopo,
>
> On 2017-06-19 19:04:46 +0200, Jacopo Mondi wrote:
> > Install async notifier for digital input on Gen3 when no other CSI-2
> > input has been found connected.
> >
> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> > ---
> >  drivers/media/platform/rcar-vin/rcar-core.c | 23 +++++++++++++++++------
> >  1 file changed, 17 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
> > index 78ca232..6e5d84a 100644
> > --- a/drivers/media/platform/rcar-vin/rcar-core.c
> > +++ b/drivers/media/platform/rcar-vin/rcar-core.c
> > @@ -866,17 +866,28 @@ static int rvin_group_graph_init(struct rvin_dev *vin)
> >  	}
> >
> >  	i = 0;
> > -	for_each_set_bit(bit, &bitmap, RVIN_CSI_MAX) {
> > -		subdevs[i++] = &vin->group->csi[bit].asd;
> > +	for_each_set_bit(bit, &bitmap, RVIN_INPUT_MAX) {
> > +		if (bit < RVIN_CSI_MAX)
> > +			subdevs[i++] = &vin->group->csi[bit].asd;
> > +		else if (bit == RVIN_PARALLEL_IN) {
> > +			subdevs[0] = &vin->digital.asd;
> > +			vin->notifier.num_subdevs = 1;
> > +		}
> >  	}
> >
> >  	vin_dbg(vin, "Claimed %d subdevices for group\n", count);
> >
> > -	vin->notifier.num_subdevs = count;
> >  	vin->notifier.subdevs = subdevs;
> > -	vin->notifier.bound = rvin_group_notify_bound;
> > -	vin->notifier.unbind = rvin_group_notify_unbind;
> > -	vin->notifier.complete = rvin_group_notify_complete;
> > +	if (!vin->notifier.num_subdevs) {
> > +		vin->notifier.num_subdevs = count;
> > +		vin->notifier.bound = rvin_group_notify_bound;
> > +		vin->notifier.unbind = rvin_group_notify_unbind;
> > +		vin->notifier.complete = rvin_group_notify_complete;
> > +	} else {
> > +		vin->notifier.bound = rvin_digital_notify_bound;
> > +		vin->notifier.unbind = rvin_digital_notify_unbind;
> > +		vin->notifier.complete = rvin_digital_notify_complete;
> > +	}
>
> Hum, if there is a digital subdevice you ignore to look for CSI-2
> devices? This feels wrong, it probably works (for now) since all CSI-2
> subdevs are found by VIN0 since it's probed first and the digital input
> is only valid for VIN4 and VIN5 right? I hope to remedy this before the
> VIN Gen3 code is ready for upstream and the goal is that each VIN should
> look for the subdevices that effects it self. With that change this will
> break :-(

This is something I probably did not get: I thought parallel input and
CSI-2 input where mutually exclusive. In particular, looking at chsel
tables (from Table 26.14 on), where routing between CSI inputs and VIN
channel is described, I did not get how parallel input fit in that
picture. My best assumption now is that when a channel is NC it means
it can be used for digital input?

>
> >
> >  	mutex_unlock(&vin->group->lock);
> >
> > --
> > 2.7.4
> >
>
> --
> Regards,
> Niklas Söderlund

  reply	other threads:[~2017-06-20  7:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 17:04 [PATCH v1 00/12] rcar: vin: Add digital input to Gen3 Jacopo Mondi
2017-06-19 17:04 ` [PATCH v1 01/12] arm64: boot: dts: salvator-x: Add camera module Jacopo Mondi
2017-06-20  7:20   ` Geert Uytterhoeven
2017-06-20  7:45   ` Laurent Pinchart
2017-06-19 17:04 ` [PATCH v1 02/12] arm64: boot: dts: Salvator-X: Add VIN parallel input Jacopo Mondi
2017-06-19 19:32   ` Niklas Söderlund
2017-06-19 17:04 ` [PATCH v1 03/12] media: i2c: mt9m111: Skip chid identification Jacopo Mondi
2017-06-20  7:48   ` Laurent Pinchart
2017-06-26 13:19     ` jmondi
2017-06-19 17:04 ` [PATCH v1 04/12] media: i2c: mt9m111: Add source pad Jacopo Mondi
2017-06-20  7:50   ` Laurent Pinchart
2017-06-19 17:04 ` [PATCH v1 05/12] media: rcar: vin: Prepare to parse Gen3 digital input Jacopo Mondi
2017-06-19 19:39   ` Niklas Söderlund
2017-06-20  7:28     ` jmondi
2017-06-19 17:04 ` [PATCH v1 06/12] media: rcar: vin: Accept parallel input on Gen3 Jacopo Mondi
2017-06-19 17:04 ` [PATCH v1 07/12] media: rcar: vin: Add ID for " Jacopo Mondi
2017-06-19 19:46   ` Niklas Söderlund
2017-06-19 17:04 ` [PATCH v1 08/12] media: rcar: vin: Parse digital input after CSI " Jacopo Mondi
2017-06-19 17:04 ` [PATCH v1 09/12] media: rcar: vin: Install notifier for digital input Jacopo Mondi
2017-06-19 19:51   ` Niklas Söderlund
2017-06-20  7:32     ` jmondi [this message]
2017-06-19 17:04 ` [PATCH v1 10/12] media: rcar: vin: Add digital input mask to vin_dev Jacopo Mondi
2017-06-19 17:04 ` [PATCH v1 11/12] media: rcar: vin: Store VIN instance id Jacopo Mondi
2017-06-19 17:04 ` [PATCH v1 12/12] media: rcar: vin: Link digital subdev to VIN instance 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=20170620073229.GC27008@w540 \
    --to=jacopo@jmondi.org \
    --cc=jacopo+renesas@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.