From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Hans Verkuil <hverkuil@xs4all.nl>,
g.liakhovetski@gmx.de, mchehab@osg.samsung.com,
linux-media@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Subject: Re: [PATCH] rcar_vin: propagate querystd() error upstream
Date: Mon, 31 Aug 2015 22:13:13 +0000 [thread overview]
Message-ID: <55E4D179.4080009@cogentembedded.com> (raw)
In-Reply-To: <55DC7AE2.6010103@xs4all.nl>
Hello.
On 08/25/2015 05:25 PM, Hans Verkuil wrote:
>> rcar_vin_set_fmt() defaults to PAL when the subdevice's querystd() method call
>> fails (e.g. due to I2C error). This doesn't work very well when a camera being
>> used outputs NTSC which has different order of fields and resolution. Let us
>> stop pretending and return the actual error (which would prevent video capture
>> on at least Renesas Henninger/Porter board where I2C seems particularly buggy).
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
>> ---
>> The patch is against the 'media_tree.git' repo's 'fixes' branch.
>>
>> drivers/media/platform/soc_camera/rcar_vin.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Index: media_tree/drivers/media/platform/soc_camera/rcar_vin.c
>> =================================>> --- media_tree.orig/drivers/media/platform/soc_camera/rcar_vin.c
>> +++ media_tree/drivers/media/platform/soc_camera/rcar_vin.c
>> @@ -1592,7 +1592,7 @@ static int rcar_vin_set_fmt(struct soc_c
>> /* Query for standard if not explicitly mentioned _TB/_BT */
>> ret = v4l2_subdev_call(sd, video, querystd, &std);
> Ouch, this should never be done like this.
Too late. :-)
> Instead the decision should be made using the last set std, never by querying.
> So querystd should be replaced by g_std in the v4l2_subdev_call above.
Hm, then this code will stop working, as adv7180.c and ml86v7667.c we use
don't support the g_std() method yet...
> The only place querystd can be called is in the QUERYSTD ioctl, all other
> ioctls should use the last set standard.
OK, I'll have to fix all the drivers involved...
> Regards,
> Hans
MBR, Sergei
WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Hans Verkuil <hverkuil@xs4all.nl>,
g.liakhovetski@gmx.de, mchehab@osg.samsung.com,
linux-media@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Subject: Re: [PATCH] rcar_vin: propagate querystd() error upstream
Date: Tue, 1 Sep 2015 01:13:13 +0300 [thread overview]
Message-ID: <55E4D179.4080009@cogentembedded.com> (raw)
In-Reply-To: <55DC7AE2.6010103@xs4all.nl>
Hello.
On 08/25/2015 05:25 PM, Hans Verkuil wrote:
>> rcar_vin_set_fmt() defaults to PAL when the subdevice's querystd() method call
>> fails (e.g. due to I2C error). This doesn't work very well when a camera being
>> used outputs NTSC which has different order of fields and resolution. Let us
>> stop pretending and return the actual error (which would prevent video capture
>> on at least Renesas Henninger/Porter board where I2C seems particularly buggy).
>>
>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>
>> ---
>> The patch is against the 'media_tree.git' repo's 'fixes' branch.
>>
>> drivers/media/platform/soc_camera/rcar_vin.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> Index: media_tree/drivers/media/platform/soc_camera/rcar_vin.c
>> ===================================================================
>> --- media_tree.orig/drivers/media/platform/soc_camera/rcar_vin.c
>> +++ media_tree/drivers/media/platform/soc_camera/rcar_vin.c
>> @@ -1592,7 +1592,7 @@ static int rcar_vin_set_fmt(struct soc_c
>> /* Query for standard if not explicitly mentioned _TB/_BT */
>> ret = v4l2_subdev_call(sd, video, querystd, &std);
> Ouch, this should never be done like this.
Too late. :-)
> Instead the decision should be made using the last set std, never by querying.
> So querystd should be replaced by g_std in the v4l2_subdev_call above.
Hm, then this code will stop working, as adv7180.c and ml86v7667.c we use
don't support the g_std() method yet...
> The only place querystd can be called is in the QUERYSTD ioctl, all other
> ioctls should use the last set standard.
OK, I'll have to fix all the drivers involved...
> Regards,
> Hans
MBR, Sergei
next prev parent reply other threads:[~2015-08-31 22:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-19 21:02 [PATCH] rcar_vin: propagate querystd() error upstream Sergei Shtylyov
2015-08-19 21:02 ` Sergei Shtylyov
2015-08-20 21:51 ` Laurent Pinchart
2015-08-20 21:51 ` Laurent Pinchart
2015-08-24 21:58 ` Sergei Shtylyov
2015-08-24 21:58 ` Sergei Shtylyov
2015-08-25 19:42 ` Laurent Pinchart
2015-08-25 19:42 ` Laurent Pinchart
2015-08-25 14:25 ` Hans Verkuil
2015-08-25 14:25 ` Hans Verkuil
2015-08-31 22:13 ` Sergei Shtylyov [this message]
2015-08-31 22:13 ` Sergei Shtylyov
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=55E4D179.4080009@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=g.liakhovetski@gmx.de \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=linux-sh@vger.kernel.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 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.