All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Steve Longerbeam <slongerbeam@gmail.com>,
	linux-media@vger.kernel.org,
	Steve Longerbeam <steve_longerbeam@mentor.com>
Subject: Re: [PATCH 07/11] media: adv7180: change mbus format to UYVY
Date: Fri, 8 Jul 2016 12:52:53 +0200	[thread overview]
Message-ID: <20160708105252.GA8687@bigcity.dyn.berto.se> (raw)
In-Reply-To: <577E72C1.3000902@metafoo.de>

On 2016-07-07 17:18:25 +0200, Lars-Peter Clausen wrote:
> On 07/07/2016 01:00 AM, Steve Longerbeam wrote:
> > Change the media bus format from YUYV8_2X8 to UYVY8_2X8. Colors
> > now look correct when capturing with the i.mx6 backend. The other
> > option is to set the SWPC bit in register 0x27 to swap the Cr and Cb
> > output samples.
> > 
> > Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com>
> 
> The patch is certainly correct from the technical point of view. But we need
> to be careful not to break any existing platforms which rely on this
> setting. So the alternative solution of changing the default output order is
> not an option.
> 
> Looking at things it seems like the Renesas vin driver, which is used in
> combination with the adv7180 on some boards, uses the return value from
> enum_mbus_code to setup the video pipeline. Adding Niklas to Cc, maybe he
> can help to test this.

Yes this change will make the rcar-vin driver fail to probe since it do 
not recognise the MEDIA_BUS_FMT_UYVY8_2X8 format.

There is a error in the Renesas VIN driver where it looks for the wrong 
media format YUVU but expects UYVY data. This error have masked the bug 
in adv7180 fixed in this commit.

I have have sent a patch '[media] rcar-vin: add legacy mode for wrong 
media bus formats' which tries to remedy this. I would like to see that 
patched (or similar solution) merged before this one as to not break the 
Renesas R-Car2 Koelsch board which uses the adv7180.

If that can be arranged

Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> 
> But otherwise
> 
> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
> 
> > ---
> >  drivers/media/i2c/adv7180.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
> > index fff887c..427695d 100644
> > --- a/drivers/media/i2c/adv7180.c
> > +++ b/drivers/media/i2c/adv7180.c
> > @@ -654,7 +654,7 @@ static int adv7180_enum_mbus_code(struct v4l2_subdev *sd,
> >  	if (code->index != 0)
> >  		return -EINVAL;
> >  
> > -	code->code = MEDIA_BUS_FMT_YUYV8_2X8;
> > +	code->code = MEDIA_BUS_FMT_UYVY8_2X8;
> >  
> >  	return 0;
> >  }
> > @@ -664,7 +664,7 @@ static int adv7180_mbus_fmt(struct v4l2_subdev *sd,
> >  {
> >  	struct adv7180_state *state = to_state(sd);
> >  
> > -	fmt->code = MEDIA_BUS_FMT_YUYV8_2X8;
> > +	fmt->code = MEDIA_BUS_FMT_UYVY8_2X8;
> >  	fmt->colorspace = V4L2_COLORSPACE_SMPTE170M;
> >  	fmt->width = 720;
> >  	fmt->height = state->curr_norm & V4L2_STD_525_60 ? 480 : 576;
> > 
> 

-- 
Regards,
Niklas Söderlund

  reply	other threads:[~2016-07-08 10:52 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 22:59 [PATCH 00/11] adv7180 subdev fixes Steve Longerbeam
2016-07-06 22:59 ` [PATCH 01/11] media: adv7180: Fix broken interrupt register access Steve Longerbeam
2016-07-07 14:44   ` Tim Harvey
2016-07-07 15:37   ` Lars-Peter Clausen
2016-07-06 22:59 ` [PATCH 02/11] Revert "[media] adv7180: fix broken standards handling" Steve Longerbeam
2016-07-07 14:48   ` Tim Harvey
2016-07-07 15:45   ` Lars-Peter Clausen
2016-07-09 18:56     ` Steve Longerbeam
2016-07-06 22:59 ` [PATCH 03/11] media: adv7180: add power pin control Steve Longerbeam
2016-07-07 15:04   ` Tim Harvey
2016-07-07 15:35   ` Lars-Peter Clausen
2016-07-06 22:59 ` [PATCH 04/11] media: adv7180: implement g_parm Steve Longerbeam
2016-07-07 15:04   ` Tim Harvey
2016-07-06 22:59 ` [PATCH 05/11] media: adv7180: init chip with AD recommended register settings Steve Longerbeam
2016-07-07 15:23   ` Tim Harvey
2016-07-07 15:29   ` Lars-Peter Clausen
2016-07-06 22:59 ` [PATCH 06/11] media: adv7180: add bt.656-4 OF property Steve Longerbeam
2016-07-07 14:52   ` Lars-Peter Clausen
2016-07-09 18:59     ` Steve Longerbeam
2016-07-09 21:10       ` Steve Longerbeam
2016-07-09 21:36         ` Steve Longerbeam
2016-07-10 12:10           ` Lars-Peter Clausen
2016-07-10 12:55             ` Hans Verkuil
2016-07-10 14:17               ` Ian Arkver
2016-07-10 14:30                 ` Hans Verkuil
2016-07-10 22:34                   ` Steve Longerbeam
2016-07-11  7:06                     ` Ian Arkver
2016-07-11 22:03                       ` Steve Longerbeam
2016-07-12 10:25                         ` Ian Arkver
2016-07-12 17:26                           ` Steve Longerbeam
2016-07-06 23:00 ` [PATCH 07/11] media: adv7180: change mbus format to UYVY Steve Longerbeam
2016-07-07 15:18   ` Lars-Peter Clausen
2016-07-08 10:52     ` Niklas Söderlund [this message]
2016-07-07 15:25   ` Tim Harvey
2016-07-06 23:00 ` [PATCH 08/11] adv7180: send V4L2_EVENT_SOURCE_CHANGE on std change Steve Longerbeam
2016-07-07 15:27   ` Tim Harvey
2016-07-06 23:00 ` [PATCH 09/11] v4l: Add signal lock status to source change events Steve Longerbeam
2016-07-06 23:00 ` [PATCH 10/11] media: adv7180: enable lock/unlock interrupts Steve Longerbeam
2016-07-06 23:00 ` [PATCH 11/11] media: adv7180: fix field type Steve Longerbeam
2016-07-07 14:37 ` [PATCH 00/11] adv7180 subdev fixes Tim Harvey
2016-07-20  0:03 ` [PATCH v2 00/10] adv7180 subdev fixes, v2 Steve Longerbeam
2016-07-20  0:03   ` [PATCH v2 01/10] v4l: of: add "newavmode" property for Analog Devices codecs Steve Longerbeam
2016-07-20  7:37     ` Hans Verkuil
2016-07-20 17:14       ` Steve Longerbeam
2016-07-20  0:03   ` [PATCH v2 02/10] media: adv7180: Fix broken interrupt register access Steve Longerbeam
2016-07-20  0:03   ` [PATCH v2 03/10] media: adv7180: define more registers Steve Longerbeam
2016-07-20  8:54     ` Lars-Peter Clausen
2016-07-20  0:03   ` [PATCH v2 04/10] media: adv7180: add support for NEWAVMODE Steve Longerbeam
2016-07-20  0:03   ` [PATCH v2 05/10] media: adv7180: add power pin control Steve Longerbeam
2016-07-20  8:53     ` Lars-Peter Clausen
2016-07-20  0:03   ` [PATCH v2 06/10] media: adv7180: implement g_parm Steve Longerbeam
2016-07-20  0:03   ` [PATCH v2 07/10] media: adv7180: change mbus format to UYVY Steve Longerbeam
2016-07-20  0:03   ` [PATCH v2 08/10] v4l: Add signal lock status to source change events Steve Longerbeam
2016-07-20  0:03   ` [PATCH v2 09/10] media: adv7180: enable lock/unlock interrupts Steve Longerbeam
2016-07-20  0:03   ` [PATCH v2 10/10] media: adv7180: fix field type Steve Longerbeam

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=20160708105252.GA8687@bigcity.dyn.berto.se \
    --to=niklas.soderlund@ragnatech.se \
    --cc=lars@metafoo.de \
    --cc=linux-media@vger.kernel.org \
    --cc=slongerbeam@gmail.com \
    --cc=steve_longerbeam@mentor.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 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.