diff mbox

[v6] V4L2: soc_camera: Renesas R-Car VIN driver

Message ID 51C42BA5.9050105@cogentembedded.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vladimir Barinov June 21, 2013, 10:32 a.m. UTC
Katsuya MATSUBARA wrote:
> Hi Vladimir,
>
> From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> Date: Fri, 21 Jun 2013 13:39:50 +0400
>
> (snip)
>   
>>> I have not seen such i2c errors during capturing and booting.
>>> But I have seen that querystd() in the ml86v7667 driver often
>>> returns V4L2_STD_UNKNOWN, although the corresponding function
>>>   
>>>       
>> could you try Hans's fix:
>> https://patchwork.kernel.org/patch/2640701/
>>     
>
> The fix has been already applied in my environment.
>   
I've found that after some iteration of submission we disabled the input 
signal in autodetection in ml86v7667_init(). per recommendations.
That could be the case why the input signal is not locked.

On adv7180 it still has optional autodetection but Hans recommended to 
get rid from runtime autodetection.
So I've added input signal detection only during boot time.

Could you please try the attached patch?

Regards,
Vladimir

Comments

Katsuya Matsubara June 21, 2013, 1:04 p.m. UTC | #1
Hi Vladimir,

From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Date: Fri, 21 Jun 2013 14:32:05 +0400

> Katsuya MATSUBARA wrote:
>> Hi Vladimir,
>>
>> From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
>> Date: Fri, 21 Jun 2013 13:39:50 +0400
>>
>> (snip)
>>   
>>>> I have not seen such i2c errors during capturing and booting.
>>>> But I have seen that querystd() in the ml86v7667 driver often
>>>> returns V4L2_STD_UNKNOWN, although the corresponding function
>>>>         
>>> could you try Hans's fix:
>>> https://patchwork.kernel.org/patch/2640701/
>>>     
>>
>> The fix has been already applied in my environment.
>>   
> I've found that after some iteration of submission we disabled the
> input signal in autodetection in ml86v7667_init(). per
> recommendations.
> That could be the case why the input signal is not locked.
> 
> On adv7180 it still has optional autodetection but Hans recommended to
> get rid from runtime autodetection.
> So I've added input signal detection only during boot time.
> 
> Could you please try the attached patch?

With the patch, V4L2_STD_UNKNOWN often returned by querystd()
in the ml86v7667 driver has been gone.
But, captured images are still incorrect that means wrong
order of fields desite '_BT' chosen for V4L2_STD_525_60.

Thanks,
---
Katsuya Matsubara / IGEL Co., Ltd
matsu@igel.co.jp

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vladimir Barinov June 22, 2013, 11:45 a.m. UTC | #2
Hi Matsubara-san,

Katsuya MATSUBARA wrote:
> Hi Vladimir,
>
> From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> Date: Fri, 21 Jun 2013 14:32:05 +0400
>
>   
>> Katsuya MATSUBARA wrote:
>>     
>>> Hi Vladimir,
>>>
>>> From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
>>> Date: Fri, 21 Jun 2013 13:39:50 +0400
>>>
>>> (snip)
>>>   
>>>       
>>>>> I have not seen such i2c errors during capturing and booting.
>>>>> But I have seen that querystd() in the ml86v7667 driver often
>>>>> returns V4L2_STD_UNKNOWN, although the corresponding function
>>>>>         
>>>>>           
>>>> could you try Hans's fix:
>>>> https://patchwork.kernel.org/patch/2640701/
>>>>     
>>>>         
>>> The fix has been already applied in my environment.
>>>   
>>>       
>> I've found that after some iteration of submission we disabled the
>> input signal in autodetection in ml86v7667_init(). per
>> recommendations.
>> That could be the case why the input signal is not locked.
>>
>> On adv7180 it still has optional autodetection but Hans recommended to
>> get rid from runtime autodetection.
>> So I've added input signal detection only during boot time.
>>
>> Could you please try the attached patch?
>>     
>
> With the patch, V4L2_STD_UNKNOWN often returned by querystd()
> in the ml86v7667 driver has been gone.
> But, captured images are still incorrect that means wrong
> order of fields desite '_BT' chosen for V4L2_STD_525_60.
>   
I've ordered the NTSC camera.
I will return once I get it.

Regards,
Vladimir

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>

Subject: V4L2: decoder: ml86v7667: fix querystd

Input signal autodetection is disabled, hence the cached V4L2_STD must be used

Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>

---
 drivers/media/i2c/ml86v7667.c |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

Index: build/drivers/media/i2c/ml86v7667.c
===================================================================
--- build.orig/drivers/media/i2c/ml86v7667.c	2013-06-21 13:24:13.000000000 +0300
+++ build/drivers/media/i2c/ml86v7667.c	2013-06-21 13:26:07.308872980 +0300
@@ -162,17 +162,9 @@ 
 
 static int ml86v7667_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
 {
-	struct i2c_client *client = v4l2_get_subdevdata(sd);
-	int status;
+	struct ml86v7667_priv *priv = to_ml86v7667(sd);
 
-	status = i2c_smbus_read_byte_data(client, STATUS_REG);
-	if (status < 0)
-		return status;
-
-	if (status & STATUS_HLOCK_DETECT)
-		*std &= status & STATUS_NTSCPAL ? V4L2_STD_625_50 : V4L2_STD_525_60;
-	else
-		*std = V4L2_STD_UNKNOWN;
+	*std = priv->std;
 
 	return 0;
 }