linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Longerbeam <slongerbeam@gmail.com>
To: Fabio Estevam <festevam@gmail.com>, Tim Harvey <tharvey@gateworks.com>
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	linux-media <linux-media@vger.kernel.org>
Subject: Re: [PATCH] media: imx.rst: Update the imx6-sabreauto ADV7180 instructions
Date: Tue, 15 Oct 2019 11:19:41 -0700	[thread overview]
Message-ID: <2acc57d6-da43-866b-fc01-e5e59af413ac@gmail.com> (raw)
In-Reply-To: <CAOMZO5AMbAHmoYFLQbZbzBjMkmTsPkPctU-OqArPk3_PvtznjA@mail.gmail.com>



On 10/15/19 9:42 AM, Fabio Estevam wrote:
> On Tue, Oct 15, 2019 at 1:33 PM Tim Harvey <tharvey@gateworks.com> wrote:
>
>> Right, because this re-creates the initial issue. Upon any signal lock
>> you would need to throw away the first few frames. I wish I knew the
>> proper way to deal with this.
> I thought this was handled by drivers/staging/media/imx/imx-media-fim.c
>
> On imx6-sabreauto we do have the input capture pins configured in the
> pinctrl entries, but I don't see any driver handling it.
>
> Also, drivers/staging/media/imx/imx-media-fim.c driver has  a #ifdef
> CONFIG_IMX_GPT_ICAP to deal with the input capture case, but such
> config symbol does not exist in mainline.
>
> It seems we still need the input capture support to be able to
> measuring frame intervals.
>
> Maybe Steve can shed some light on this?

I submitted the ICAP driver patch quite a while ago, it was ~2 yrs ago I 
think. Can't seem to find the link unfortunately.

I'll work on updating the driver and retesting, and try resubmitting again.

Most of the hooks are present in imx-media-fim.c to use the hardware 
input capture to measure frame intervals. The only missing piece is the 
ICAP driver itself.

The FIM is explained in the imx.rst doc. It is configured and enabled 
via v4l2 controls. It will report a v4l2_event to userspace during 
streaming when a bad frame interval is detected. The rolling video / 
vsync problem caused by the initial corrupt frames from the adv718x 
produces bad frame intervals, thus the FIM event can be used to restart 
streaming, which will correct vsync (as long as the bad initial frames 
are skipped, which is the other piece of this problem that needs an 
acceptable solution).

The FIM can still be used now, without input capture support, but it is 
marking frame intervals using the monotonic time in the dma completion 
irq handler, which is not always accurate due to irq latency, depending 
on system load. So this method can sometimes report bad frame interval 
events that aren't real.

Steve


  reply	other threads:[~2019-10-15 18:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-10 15:44 [PATCH] media: imx.rst: Update the imx6-sabreauto ADV7180 instructions Fabio Estevam
2019-10-12 20:14 ` Steve Longerbeam
2019-10-12 20:24   ` Steve Longerbeam
2019-10-12 21:19     ` Fabio Estevam
2019-10-15 15:49       ` Tim Harvey
2019-10-15 15:53         ` Fabio Estevam
2019-10-15 16:07           ` Tim Harvey
2019-10-15 16:16             ` Fabio Estevam
2019-10-15 16:33               ` Tim Harvey
2019-10-15 16:42                 ` Fabio Estevam
2019-10-15 18:19                   ` Steve Longerbeam [this message]
2019-10-15 19:11                     ` Fabio Estevam
2019-10-16  1:17                       ` Steve Longerbeam
2019-10-16  1:32                         ` Fabio Estevam
2019-10-16 13:04                         ` Fabio Estevam
2019-10-16 17:31                           ` Steve Longerbeam
2019-10-16 18:54                             ` Fabio Estevam
2019-10-16 19:11                               ` Steve Longerbeam
2019-10-16 19:51                                 ` Fabio Estevam
2020-06-25 10:53                                   ` Hans Verkuil
2020-06-25 11:38                                     ` Fabio Estevam

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=2acc57d6-da43-866b-fc01-e5e59af413ac@gmail.com \
    --to=slongerbeam@gmail.com \
    --cc=festevam@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=tharvey@gateworks.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).