public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Javier Martinez Canillas <javier@osg.samsung.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Eduard Gavin <egavinc@gmail.com>
Subject: Re: [PATCH] tvp5150: Fix breakage for serial usage
Date: Mon, 25 Jan 2016 19:23:40 +0200	[thread overview]
Message-ID: <2245834.R0faizq23Z@avalon> (raw)
In-Reply-To: <54ffe2ae9209b607f54142809902764e2eaaf1d2.1453740290.git.mchehab@osg.samsung.com>

Hi Mauro,

On Monday 25 January 2016 14:44:56 Mauro Carvalho Chehab wrote:
> changeset 460b6c0831cb ("tvp5150: Add s_stream subdev operation
> support") broke for em28xx-based devices with uses tvp5150. On those
> devices, touching the TVP5150_MISC_CTL register causes em28xx to stop
> streaming.
> 
> I suspect that it uses the 27 MHz clock provided by tvp5150 to feed
> em28xx. So, change the logic to do nothing on s_stream if the tvp5150 is
> not set up to work with V4L2_MBUS_PARALLEL.
> 
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
> ---
>  drivers/media/i2c/tvp5150.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
> index 437f1a7ecb96..779c6f453cc9 100644
> --- a/drivers/media/i2c/tvp5150.c
> +++ b/drivers/media/i2c/tvp5150.c
> @@ -975,19 +975,18 @@ static int tvp5150_g_mbus_config(struct v4l2_subdev
> *sd, static int tvp5150_s_stream(struct v4l2_subdev *sd, int enable)
>  {
>  	struct tvp5150 *decoder = to_tvp5150(sd);
> -	/* Output format: 8-bit ITU-R BT.656 with embedded syncs */
> -	int val = 0x09;
> 
>  	/* Output format: 8-bit 4:2:2 YUV with discrete sync */
> -	if (decoder->mbus_type == V4L2_MBUS_PARALLEL)
> -		val = 0x0d;
> +	if (decoder->mbus_type != V4L2_MBUS_PARALLEL)
> +		return 0;

This will break TVP5151 operation with the OMAP3 ISP in BT.656 mode. The OMAP3 
requires the TVP5151 to start and stop streaming when requested.

> 
>  	/* Initializes TVP5150 to its default values */
>  	/* # set PCLK (27MHz) */
>  	tvp5150_write(sd, TVP5150_CONF_SHARED_PIN, 0x00);
> 
> +	/* Output format: 8-bit ITU-R BT.656 with embedded syncs */
>  	if (enable)
> -		tvp5150_write(sd, TVP5150_MISC_CTL, val);
> +		tvp5150_write(sd, TVP5150_MISC_CTL, 0x09);
>  	else
>  		tvp5150_write(sd, TVP5150_MISC_CTL, 0x00);

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2016-01-25 17:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 16:44 [PATCH] tvp5150: Fix breakage for serial usage Mauro Carvalho Chehab
2016-01-25 16:50 ` Mauro Carvalho Chehab
2016-01-25 17:23 ` Laurent Pinchart [this message]
2016-01-25 17:35   ` Mauro Carvalho Chehab
2016-01-25 17:38     ` Laurent Pinchart
2016-01-25 18:13       ` Mauro Carvalho Chehab
2016-01-25 18:42         ` Laurent Pinchart
2016-01-25 19:07           ` Mauro Carvalho Chehab
2016-01-25 19:32             ` Laurent Pinchart
2016-01-25 20:01               ` Mauro Carvalho Chehab
2016-01-26  9:09                 ` Mauro Carvalho Chehab
2016-01-26 17:06                   ` Laurent Pinchart

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=2245834.R0faizq23Z@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=egavinc@gmail.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=hans.verkuil@cisco.com \
    --cc=javier@osg.samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@osg.samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox