public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Federico Vaga <federico.vaga@gmail.com>
Cc: linux-media@vger.kernel.org, Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCH 2/6] sta2x11_vip: fix s_std
Date: Fri, 22 Apr 2016 15:17:20 +0200	[thread overview]
Message-ID: <571A2460.7010203@xs4all.nl> (raw)
In-Reply-To: <146136747.clRru94iZt@number-5>

On 04/22/2016 03:15 PM, Federico Vaga wrote:
> Acked-by: Federico Vaga <federico.vaga@gmail.com>
> 
> It sounds fine to me (even the ADV7180 patch). Unfortunately I do not have the 
> hardware to test it.

Your Ack will have to suffice :-)

Can you Ack the adv7180 patch as well? Would be nice.

Regards,

	Hans

> 
> On Friday, April 22, 2016 03:03:38 PM Hans Verkuil wrote:
>> From: Hans Verkuil <hans.verkuil@cisco.com>
>>
>> The s_std ioctl was broken in this driver, partially due to the
>> changes to the adv7180 driver (this affected the handling of
>> V4L2_STD_ALL) and partially because the new standard was never
>> stored in vip->std.
>>
>> The handling of V4L2_STD_ALL has been rewritten to just call querystd
>> and the new standard is now stored correctly.
>>
>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
>> Cc: Federico Vaga <federico.vaga@gmail.com>
>> ---
>>  drivers/media/pci/sta2x11/sta2x11_vip.c | 26 ++++++++++----------------
>>  1 file changed, 10 insertions(+), 16 deletions(-)
>>
>> diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c
>> b/drivers/media/pci/sta2x11/sta2x11_vip.c index 753411c..c79623c 100644
>> --- a/drivers/media/pci/sta2x11/sta2x11_vip.c
>> +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c
>> @@ -444,27 +444,21 @@ static int vidioc_querycap(struct file *file, void
>> *priv, static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id
>> std) {
>>  	struct sta2x11_vip *vip = video_drvdata(file);
>> -	v4l2_std_id oldstd = vip->std, newstd;
>> +	v4l2_std_id oldstd = vip->std;
>>  	int status;
>>
>> -	if (V4L2_STD_ALL == std) {
>> -		v4l2_subdev_call(vip->decoder, video, s_std, std);
>> -		ssleep(2);
>> -		v4l2_subdev_call(vip->decoder, video, querystd, &newstd);
>> -		v4l2_subdev_call(vip->decoder, video, g_input_status, &status);
>> -		if (status & V4L2_IN_ST_NO_SIGNAL)
>> +	/*
>> +	 * This is here for backwards compatibility only.
>> +	 * The use of V4L2_STD_ALL to trigger a querystd is non-standard.
>> +	 */
>> +	if (std == V4L2_STD_ALL) {
>> +		v4l2_subdev_call(vip->decoder, video, querystd, &std);
>> +		if (std == V4L2_STD_UNKNOWN)
>>  			return -EIO;
>> -		std = vip->std = newstd;
>> -		if (oldstd != std) {
>> -			if (V4L2_STD_525_60 & std)
>> -				vip->format = formats_60[0];
>> -			else
>> -				vip->format = formats_50[0];
>> -		}
>> -		return 0;
>>  	}
>>
>> -	if (oldstd != std) {
>> +	if (vip->std != std) {
>> +		vip->std = std;
>>  		if (V4L2_STD_525_60 & std)
>>  			vip->format = formats_60[0];
>>  		else
> 


  reply	other threads:[~2016-04-22 13:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 13:03 [PATCH 0/6] Various rcar-vin and adv* fixes Hans Verkuil
2016-04-22 13:03 ` [PATCH 1/6] adv7180: fix broken standards handling Hans Verkuil
2016-04-22 13:46   ` Federico Vaga
2016-04-22 14:19   ` Niklas Söderlund
2016-04-24 14:57   ` Lars-Peter Clausen
2016-04-22 13:03 ` [PATCH 2/6] sta2x11_vip: fix s_std Hans Verkuil
2016-04-22 13:15   ` Federico Vaga
2016-04-22 13:17     ` Hans Verkuil [this message]
2016-04-22 13:03 ` [PATCH 3/6] rcar-vin: support the source change event and " Hans Verkuil
2016-04-22 18:55   ` Niklas Söderlund
2016-04-22 13:03 ` [PATCH 4/6] tc358743: drop bogus comment Hans Verkuil
2016-04-22 13:03 ` [PATCH 5/6] media/i2c/adv*: make controls inheritable instead of private Hans Verkuil
2016-04-22 13:03 ` [PATCH 6/6] rcar-vin: failed start_streaming didn't call s_stream(0) Hans Verkuil
2016-04-22 18:57   ` 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=571A2460.7010203@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=federico.vaga@gmail.com \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    /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