mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steve Longerbeam <steve_longerbeam@mentor.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	Suresh Dhandapani <Suresh.Dhandapani@in.bosch.com>,
	Hans Verkuil <hverkuil@xs4all.nl>
Subject: Re: [PATCH 12/16] gpu: ipu-v3: Fix CSI0 blur in NTSC format
Date: Fri, 15 Jul 2016 16:09:19 -0700	[thread overview]
Message-ID: <57896D1F.3000002@mentor.com> (raw)
In-Reply-To: <1468587534.7213.41.camel@pengutronix.de>



On 07/15/2016 05:58 AM, Philipp Zabel wrote:
> Am Mittwoch, den 13.07.2016, 16:02 -0700 schrieb Steve Longerbeam:
>> On 07/10/2016 09:33 AM, Steve Longerbeam wrote:
>>>
>>> On 07/08/2016 10:34 AM, Philipp Zabel wrote:
>>>> Am Donnerstag, den 07.07.2016, 16:03 -0700 schrieb Steve Longerbeam:
>>>>> From: Suresh Dhandapani <Suresh.Dhandapani@in.bosch.com>
>>>>>
>>>>> This patch will change the register IPU_CSI0_CCIR_CODE_2 value from
>>>>> 0x40596 to 0x405A6. The change is related to the Start of field 1
>>>>> first blanking line command bit[5-3] for NTSC format only. This
>>>>> change is dependent with ADV chip where the NEWAVMODE is set to 0
>>>>> in register 0x31. Setting NEWAVMODE to "0" in ADV means "EAV/SAV
>>>>> codes generated to suit analog devices encoders".
>>>>>
>>>>> Signed-off-by: Suresh Dhandapani <Suresh.Dhandapani@in.bosch.com>
>>>>> ---
>>>>>    drivers/gpu/ipu-v3/ipu-csi.c | 2 +-
>>>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c
>>>>> index 0eac28c..ec81958 100644
>>>>> --- a/drivers/gpu/ipu-v3/ipu-csi.c
>>>>> +++ b/drivers/gpu/ipu-v3/ipu-csi.c
>>>>> @@ -422,7 +422,7 @@ int ipu_csi_init_interface(struct ipu_csi *csi,
>>>>>                  ipu_csi_write(csi, 0xD07DF | CSI_CCIR_ERR_DET_EN,
>>>>>                          CSI_CCIR_CODE_1);
>>>>> -            ipu_csi_write(csi, 0x40596, CSI_CCIR_CODE_2);
>>>>> +            ipu_csi_write(csi, 0x405A6, CSI_CCIR_CODE_2);
>>>>>                ipu_csi_write(csi, 0xFF0000, CSI_CCIR_CODE_3);
>>>>>            } else {
>>>>>                dev_err(csi->ipu->dev,
>>>> This looks like a very hardware specific hack? I'll at least have to
>>>> test if that also works with other analog decoders.
>>> Hi Philipp,
>>>
>>> Yes it's a hack, but it has always been a hack (hardcoded values). And the
>>> reason is simple, nobody AFAIK (including me) understands how to program
>>> these CSI_CCIR_CODE registers, the description in the reference manual is
>>> complete gibberish.
>> Hi Philipp, Ian over at linux-media helped me to understand these registers a
>> little better, although there are still mysteries given the poor documentation.
>> You should have been copied on that linux-media thread.
>>
>>> The reason we made this change is that, in discussions with Analog Devices,
>>> they recommended setting NEWAVMODE, which changes the positions of
>>> the AV codes sent by the ADV7180 on the bt.656 bus. It took Suresh at least
>>> a full day of reverse engineering (Suresh correct me if I am wrong) to hit
>>> on the correct values in these registers to regain stable video after switching
>>> the ADV7180 to NEWAVMODE.
>> So this NEWAVMODE is somehow breaking from the BT.656 standard, which
>> necessitated the change to CSI_CCIR_CODE_2. So NEWAVMODE if enabled in
>> the ADV7180 will break other capture backends that are expecting standard
>> BT.656 SAV/EAV codes. So NEWAVMODE should not be used and I will remove
>> this patch in the next version.
> Ok. To use that mode, first a new v4l2 mbus type and corresponding DT
> bindings would have to be added.

Hmm, do you mean define something like a V4L2_MBUS_BT656_NEWAVMODE,
and then add a new "newavmode" boolean DT binding parsed by
v4l2_of_parse_endpoint()?

I don't know if that would make sense given that this NEWAVMODE is a kind
of hack of the BT.656 standard, only used by Analog Devices 
encoders/decoders.

Although there a _lot_ of AD encoder/decoder chips (and subdev drivers 
written for
them), so maybe it would make sense to do this.

Adding Hans.

Steve

  reply	other threads:[~2016-07-15 23:09 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07 23:03 [PATCH 00/16] IPUv3 prep for i.MX5/6 v4l2 staging drivers Steve Longerbeam
2016-07-07 23:03 ` [PATCH 01/16] gpu: ipu-v3: Add Video Deinterlacer unit Steve Longerbeam
2016-07-11  0:02   ` Paul Gortmaker
2016-07-15 22:35     ` Steve Longerbeam
2016-07-07 23:03 ` [PATCH 02/16] gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset() Steve Longerbeam
2016-07-08 17:34   ` Philipp Zabel
2016-07-13 22:54     ` Steve Longerbeam
2016-07-15 12:45       ` Philipp Zabel
2016-07-07 23:03 ` [PATCH 03/16] gpu: ipu-cpmem: Add ipu_cpmem_get_burstsize() Steve Longerbeam
2016-07-07 23:03 ` [PATCH 04/16] gpu: ipu-v3: Add ipu_get_num() Steve Longerbeam
2016-07-15 12:45   ` Philipp Zabel
2016-07-07 23:03 ` [PATCH 05/16] gpu: ipu-v3: Add IDMA channel linking support Steve Longerbeam
2016-07-08 17:34   ` Philipp Zabel
2016-07-13 22:55     ` Steve Longerbeam
2016-07-07 23:03 ` [PATCH 06/16] gpu: ipu-v3: Add ipu_set_vdi_src_mux() Steve Longerbeam
2016-07-15 12:48   ` Philipp Zabel
2016-07-15 21:33     ` Steve Longerbeam
2016-07-07 23:03 ` [PATCH 07/16] gpu: ipu-v3: Add VDI input IDMAC channels Steve Longerbeam
2016-07-15 12:45   ` Philipp Zabel
2016-07-15 21:34     ` Steve Longerbeam
2016-07-07 23:03 ` [PATCH 08/16] gpu: ipu-v3: Add ipu_csi_set_src() Steve Longerbeam
2016-07-15 12:49   ` Philipp Zabel
2016-07-15 21:45     ` Steve Longerbeam
2016-07-07 23:03 ` [PATCH 09/16] gpu: ipu-v3: Add ipu_ic_set_src() Steve Longerbeam
2016-07-15 12:45   ` Philipp Zabel
2016-07-15 21:57     ` Steve Longerbeam
2016-07-07 23:03 ` [PATCH 10/16] gpu: ipu-v3: set correct full sensor frame for PAL/NTSC Steve Longerbeam
2016-07-07 23:03 ` [PATCH 11/16] gpu: ipu-v3: Fix CSI data format for 16-bit media bus formats Steve Longerbeam
2016-07-08 17:38   ` Philipp Zabel
2016-07-07 23:03 ` [PATCH 12/16] gpu: ipu-v3: Fix CSI0 blur in NTSC format Steve Longerbeam
2016-07-08 17:34   ` Philipp Zabel
2016-07-10 16:33     ` Steve Longerbeam
2016-07-13 23:02       ` Steve Longerbeam
2016-07-15 12:58         ` Philipp Zabel
2016-07-15 23:09           ` Steve Longerbeam [this message]
2016-07-16 20:24             ` Steve Longerbeam
2016-07-19 13:32               ` Philipp Zabel
2016-07-20  0:07                 ` Steve Longerbeam
2016-07-07 23:03 ` [PATCH 13/16] gpu: ipu-v3: Fix IRT usage Steve Longerbeam
2016-07-07 23:03 ` [PATCH 14/16] gpu: ipu-ic: Add complete image conversion support with tiling Steve Longerbeam
2016-07-07 23:03 ` [PATCH 15/16] gpu: ipu-ic: allow multiple handles to ic Steve Longerbeam
2016-07-07 23:03 ` [PATCH 16/16] gpu: ipu-v3: rename CSI client device Steve Longerbeam
2016-07-08 17:34 ` [PATCH 00/16] IPUv3 prep for i.MX5/6 v4l2 staging drivers Philipp Zabel
2016-07-20  1:10 ` [PATCH v2 00/13] IPUv3 prep for i.MX5/6 v4l2 staging drivers, v2 Steve Longerbeam
2016-07-20  1:10   ` [PATCH v2 01/13] gpu: ipu-v3: Add Video Deinterlacer unit Steve Longerbeam
2016-07-25  6:06     ` kbuild test robot
2016-07-26 10:06     ` Philipp Zabel
2016-07-20  1:11   ` [PATCH v2 02/13] gpu: ipu-cpmem: Add ipu_cpmem_set_uv_offset() Steve Longerbeam
2016-07-20  1:11   ` [PATCH v2 03/13] gpu: ipu-cpmem: Add ipu_cpmem_get_burstsize() Steve Longerbeam
2016-07-20  1:11   ` [PATCH v2 04/13] gpu: ipu-v3: Add ipu_get_num() Steve Longerbeam
2016-07-20  1:11   ` [PATCH v2 05/13] gpu: ipu-v3: Add IDMA channel linking support Steve Longerbeam
2016-07-26 10:06     ` Philipp Zabel
2016-07-28 23:40       ` Steve Longerbeam
2016-07-20  1:11   ` [PATCH v2 06/13] gpu: ipu-v3: Add ipu_set_vdi_src_mux() Steve Longerbeam
2016-07-20  1:11   ` [PATCH v2 07/13] gpu: ipu-v3: Add VDI input IDMAC channels Steve Longerbeam
2016-07-20  1:11   ` [PATCH v2 08/13] gpu: ipu-v3: set correct full sensor frame for PAL/NTSC Steve Longerbeam
2016-07-20  1:11   ` [PATCH v2 09/13] gpu: ipu-v3: Fix CSI data format for 16-bit media bus formats Steve Longerbeam
2016-07-20  1:11   ` [PATCH v2 10/13] gpu: ipu-v3: Fix IRT usage Steve Longerbeam
2016-07-20  1:11   ` [PATCH v2 11/13] gpu: ipu-ic: Add complete image conversion support with tiling Steve Longerbeam
2016-07-26 10:08     ` Philipp Zabel
2016-07-28 23:09       ` Steve Longerbeam
2016-08-01  9:29         ` Philipp Zabel
2016-08-04  0:18           ` Steve Longerbeam
2016-08-12 14:56             ` Philipp Zabel
2016-07-20  1:11   ` [PATCH v2 12/13] gpu: ipu-ic: allow multiple handles to ic Steve Longerbeam
2016-07-20  1:11   ` [PATCH v2 13/13] gpu: ipu-v3: rename CSI client device Steve Longerbeam
2016-07-26 10:06   ` [PATCH v2 00/13] IPUv3 prep for i.MX5/6 v4l2 staging drivers, v2 Philipp Zabel

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=57896D1F.3000002@mentor.com \
    --to=steve_longerbeam@mentor.com \
    --cc=Suresh.Dhandapani@in.bosch.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    /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

Powered by JetHome