From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
To: Katsuya MATSUBARA <matsu@igel.co.jp>
Cc: sergei.shtylyov@cogentembedded.com, g.liakhovetski@gmx.de,
mchehab@redhat.com, linux-media@vger.kernel.org,
magnus.damm@gmail.com, linux-sh@vger.kernel.org,
phil.edworthy@renesas.com
Subject: Re: [PATCH v6] V4L2: soc_camera: Renesas R-Car VIN driver
Date: Fri, 21 Jun 2013 09:39:50 +0000 [thread overview]
Message-ID: <51C41F66.1060300@cogentembedded.com> (raw)
In-Reply-To: <20130621.180932.452518378.matsu@igel.co.jp>
Hi Matsubara-san,
Katsuya MATSUBARA wrote:
> Hi Vladimir,
>
> From: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
> Date: Fri, 21 Jun 2013 12:06:12 +0400
>
>
>> Hi Matsubara-san,
>>
>> Katsuya MATSUBARA wrote:
>>
>>> Hi Sergei and Valadmir,
>>>
>>> From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>>> Date: Fri, 24 May 2013 02:11:28 +0400
>>>
>>> (snip)
>>>
>>>
>>>> +/* Similar to set_crop multistage iterative algorithm */
>>>> +static int rcar_vin_set_fmt(struct soc_camera_device *icd,
>>>> + struct v4l2_format *f)
>>>> +{
>>>> + struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
>>>> + struct rcar_vin_priv *priv = ici->priv;
>>>> + struct v4l2_subdev *sd = soc_camera_to_subdev(icd);
>>>> + struct rcar_vin_cam *cam = icd->host_priv;
>>>> + struct v4l2_pix_format *pix = &f->fmt.pix;
>>>> + struct v4l2_mbus_framefmt mf;
>>>> + struct device *dev = icd->parent;
>>>> + __u32 pixfmt = pix->pixelformat;
>>>> + const struct soc_camera_format_xlate *xlate;
>>>> + unsigned int vin_sub_width = 0, vin_sub_height = 0;
>>>> + int ret;
>>>> + bool can_scale;
>>>> + enum v4l2_field field;
>>>> + v4l2_std_id std;
>>>> +
>>>> + dev_dbg(dev, "S_FMT(pix=0x%x, %ux%u)\n",
>>>> + pixfmt, pix->width, pix->height);
>>>> +
>>>> + switch (pix->field) {
>>>> + default:
>>>> + pix->field = V4L2_FIELD_NONE;
>>>> + /* fall-through */
>>>> + case V4L2_FIELD_NONE:
>>>> + case V4L2_FIELD_TOP:
>>>> + case V4L2_FIELD_BOTTOM:
>>>> + case V4L2_FIELD_INTERLACED_TB:
>>>> + case V4L2_FIELD_INTERLACED_BT:
>>>> + field = pix->field;
>>>> + break;
>>>> + case V4L2_FIELD_INTERLACED:
>>>> + /* Query for standard if not explicitly mentioned _TB/_BT */
>>>> + ret = v4l2_subdev_call(sd, video, querystd, &std);
>>>> + if (ret < 0)
>>>> + std = V4L2_STD_625_50;
>>>> +
>>>> + field = std & V4L2_STD_625_50 ? V4L2_FIELD_INTERLACED_TB :
>>>> + V4L2_FIELD_INTERLACED_BT;
>>>> + break;
>>>> + }
>>>>
>>>>
>>> I have tested your VIN driver with NTSC video input
>>> with the following two boards;
>>>
>>> 1. Marzen (R-CarH1 SoC and ADV7180 video decoder)
>>> 2. BOCK-W (R-CarM1A SoC and ML86V7667 video decoder)
>>>
>>> As a result, I have got strange captured images in the BOCK-W
>>> environment. The image looks that the top and bottom fields
>>> have been combined in wrong order.
>>> However, in case of Marzen, it works fine with correct images
>>> captured. I made sure that the driver chose the
>>> V4L2_FIELD_INTERLACED_BT flag for the NTSC standard video
>>> in the both environments.
>>>
>>> Have you seen such an iusse with the ML86V7667 driver?
>>> I think there may be some mismatch between the VIN
>>> and the ML86V7667 settings.
>>>
>>>
>> Unfortunately, I had ability to test decoder only with PAL camera. And
>> I've made the fake tests for NTSC standard reported by video decoders
>> to validate the difference on captured image.
>> The interlace on bock-w was correct for PAL standard in accordance to
>> above tests.
>>
>> I have been able to see incorrect mix up of _TB/_BT only in case of
>> i2c transaction fails during subdevice V4L2_STD runtime query.
>>
>
> I have slightly investigated the issue on bock-w.
>
> 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/
> in the adv7180 driver always returns V4L2_STD_525_60 for NTSC video.
> The driver also chose '_BT' for V4L2_STD_UNKNOWN, so even in this
> case the display should be fine for NTSC video.
> I have confirmed that the driver always selects '_BT' for NTSC
> video even if I repeat it several times in my environment.
>
> Thanks,
> ---
> Katsuya Matsubara / IGEL Co., Ltd
> matsu@igel.co.jp
>
>
next prev parent reply other threads:[~2013-06-21 9:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 22:11 [PATCH v6] V4L2: soc_camera: Renesas R-Car VIN driver Sergei Shtylyov
2013-06-02 18:56 ` Sergei Shtylyov
2013-06-04 1:08 ` Simon Horman
2013-06-13 13:12 ` Guennadi Liakhovetski
2013-06-21 0:50 ` Vladimir Barinov
2013-06-21 20:08 ` Sergei Shtylyov
2013-06-21 4:46 ` Katsuya MATSUBARA
2013-06-21 8:06 ` Vladimir Barinov
2013-06-21 9:09 ` Katsuya MATSUBARA
2013-06-21 9:39 ` Vladimir Barinov [this message]
2013-06-21 10:01 ` Katsuya MATSUBARA
2013-06-21 10:32 ` Vladimir Barinov
2013-06-21 13:04 ` Katsuya MATSUBARA
2013-06-22 11:45 ` Vladimir Barinov
2013-07-25 3:01 ` [PATCH v8] " Katsuya MATSUBARA
2013-07-25 6:55 ` Vladimir Barinov
2013-07-25 7:29 ` Katsuya MATSUBARA
2013-07-26 11:11 ` Guennadi Liakhovetski
2013-07-30 7:36 ` Katsuya MATSUBARA
2013-07-30 7:45 ` Guennadi Liakhovetski
-- strict thread matches above, loose matches on Subject: below --
2013-07-19 23:14 Sergei Shtylyov
2013-07-24 16:14 ` Guennadi Liakhovetski
2013-07-24 19:36 ` Vladimir Barinov
2013-07-24 20:38 ` Guennadi Liakhovetski
2013-07-24 19:40 ` Sergei Shtylyov
2013-07-24 20:26 ` Guennadi Liakhovetski
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=51C41F66.1060300@cogentembedded.com \
--to=vladimir.barinov@cogentembedded.com \
--cc=g.liakhovetski@gmx.de \
--cc=linux-media@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=matsu@igel.co.jp \
--cc=mchehab@redhat.com \
--cc=phil.edworthy@renesas.com \
--cc=sergei.shtylyov@cogentembedded.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;
as well as URLs for NNTP newsgroup(s).