linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jacopo mondi <jacopo@jmondi.org>
To: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>,
	laurent.pinchart@ideasonboard.com, horms@verge.net.au,
	geert@glider.be, linux-media@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 3/6] media: rcar-vin: Handle data-active property
Date: Thu, 17 May 2018 10:30:00 +0200	[thread overview]
Message-ID: <20180517083000.GV5956@w540> (raw)
In-Reply-To: <20180516215847.GD17948@bigcity.dyn.berto.se>

[-- Attachment #1: Type: text/plain, Size: 3052 bytes --]

Hi Niklas,

On Wed, May 16, 2018 at 11:58:47PM +0200, Niklas Söderlund wrote:
> Hi Jacopo,
>
> Thanks for your work.
>
> On 2018-05-16 18:32:29 +0200, Jacopo Mondi wrote:
> > The data-active property has to be specified when running with embedded
> > synchronization. The VIN peripheral can use HSYNC in place of CLOCKENB
> > when the CLOCKENB pin is not connected, this requires explicit
> > synchronization to be in use.
>
> Is this really the intent of the data-active property? I read the
> video-interfaces.txt document as such as if no hsync-active,
> vsync-active and data-active we should use the embedded synchronization
> else set the polarity for the requested pins. What am I not
> understanding here?

Almost correct.

The presence of hsync-active, vsync-active and field-evev-active
properties determinate the bus type we're running on. If none of the
is specified, the bus is marked 'BT656' and we assume the system is
using embedded synchronization.

data-active does not take part in the bus identification, and my
reasoning was the other way around as explained in reply to your
comment on [2/6], and as explained there my reasoning is probably
wrong, and we should set CHS -only- when running with explicit
synchronization, instead of making it mandatory when running with
embedded syncs.

Thanks and sorry for my confusion.

    j
>
> >
> > Now that the driver supports 'data-active' property, it makes not sense
> > to zero the mbus configuration flags when running with implicit synch
> > (V4L2_MBUS_BT656).
> >
> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> > ---
> >  drivers/media/platform/rcar-vin/rcar-core.c | 10 ++++++++--
> >  1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
> > index d3072e1..075d08f 100644
> > --- a/drivers/media/platform/rcar-vin/rcar-core.c
> > +++ b/drivers/media/platform/rcar-vin/rcar-core.c
> > @@ -531,15 +531,21 @@ static int rvin_digital_parse_v4l2(struct device *dev,
> >  		return -ENOTCONN;
> >
> >  	vin->mbus_cfg.type = vep->bus_type;
> > +	vin->mbus_cfg.flags = vep->bus.parallel.flags;
> >
> >  	switch (vin->mbus_cfg.type) {
> >  	case V4L2_MBUS_PARALLEL:
> >  		vin_dbg(vin, "Found PARALLEL media bus\n");
> > -		vin->mbus_cfg.flags = vep->bus.parallel.flags;
> >  		break;
> >  	case V4L2_MBUS_BT656:
> >  		vin_dbg(vin, "Found BT656 media bus\n");
> > -		vin->mbus_cfg.flags = 0;
> > +
> > +		if (!(vin->mbus_cfg.flags & V4L2_MBUS_DATA_ACTIVE_HIGH) &&
> > +		    !(vin->mbus_cfg.flags & V4L2_MBUS_DATA_ACTIVE_LOW)) {
> > +			vin_err(vin,
> > +				"Missing data enable signal polarity property\n");
>
> I fear this can't be an error as that would break backward comp ability
> with existing dtb's.
>
> > +			return -EINVAL;
> > +		}
> >  		break;
> >  	default:
> >  		vin_err(vin, "Unknown media bus type\n");
> > --
> > 2.7.4
> >
>
> --
> Regards,
> Niklas Söderlund

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2018-05-17  8:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-16 16:32 [PATCH 0/6] media: rcar-vin: Brush endpoint properties Jacopo Mondi
2018-05-16 16:32 ` [PATCH 1/6] dt-bindings: media: rcar-vin: Describe optional ep properties Jacopo Mondi
2018-05-16 21:18   ` Niklas Söderlund
2018-05-23 16:29   ` Rob Herring
2018-05-23 19:38     ` Laurent Pinchart
2018-05-23 19:55       ` Rob Herring
2018-05-16 16:32 ` [PATCH 2/6] dt-bindings: media: rcar-vin: Document data-active Jacopo Mondi
2018-05-16 21:55   ` Niklas Söderlund
2018-05-17  8:25     ` jacopo mondi
2018-05-23 16:37   ` Rob Herring
2018-05-16 16:32 ` [PATCH 3/6] media: rcar-vin: Handle data-active property Jacopo Mondi
2018-05-16 21:58   ` Niklas Söderlund
2018-05-17  8:30     ` jacopo mondi [this message]
2018-05-17  8:48   ` Sergei Shtylyov
2018-05-16 16:32 ` [PATCH 4/6] media: rcar-vin: Handle CLOCKENB pin polarity Jacopo Mondi
2018-05-16 22:11   ` Niklas Söderlund
2018-05-17  8:41     ` jacopo mondi
2018-05-16 16:32 ` [PATCH 5/6] ARM: dts: rcar-gen2: Remove unused VIN properties Jacopo Mondi
2018-05-16 22:13   ` Niklas Söderlund
2018-05-17  9:01     ` jacopo mondi
2018-05-22  8:18       ` Simon Horman
2018-05-23 16:33     ` Rob Herring
2018-05-16 16:32 ` [PATCH 6/6] ARM: dts: rcar-gen2: Add 'data-active' property Jacopo Mondi
2018-05-16 22:15   ` Niklas Söderlund
2018-05-16 21:16 ` [PATCH 0/6] media: rcar-vin: Brush endpoint properties Niklas Söderlund

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=20180517083000.GV5956@w540 \
    --to=jacopo@jmondi.org \
    --cc=geert@glider.be \
    --cc=horms@verge.net.au \
    --cc=jacopo+renesas@jmondi.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --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 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).