public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Michael Jones <michael.jones@matrix-vision.de>,
	linux-media ML <linux-media@vger.kernel.org>
Subject: Re: double-buffering with the omap3 parallel interface
Date: Tue, 18 Jun 2013 17:18:34 +0200	[thread overview]
Message-ID: <2509851.dYUFSdVPB5@avalon> (raw)
In-Reply-To: <20130616234449.GB2064@valkosipuli.retiisi.org.uk>

Hi Michael,

On Monday 17 June 2013 02:44:50 Sakari Ailus wrote:
> On Wed, Jun 12, 2013 at 06:16:26PM +0200, Michael Jones wrote:
> > Hi Laurent & co.,
> > 
> > I'd like to look at what the maximum possible frame rates are for a sensor
> > connected to the OMAP3 ISP CCDC via the parallel interface, writing frames
> > directly to memory. I understand that there is some minimum amount of time
> > required between frames to pass on the finished frame and set up the
> > address to be written to for the next frame. From the manual it looks like
> > a double buffering scheme would've been available on a different sensor
> > interface, but isn't on the parallel one.
> > 
> > Do I see that right? Is it impossible to use double buffering of any sort
> > while using the parallel interface to memory?

That's correct. The CCDC has a single destination memory address register, so 
you can only queue a single buffer to the hardware.

> > I'm still using an older version of the driver, but I've browsed the
> > current state of the code, too. What behavior do you expect if the time
> > between frames is too short for the buffer management? Can it be recovered
> > from?

The CCDC is stopped after each frame, reconfigured, and then restarted. If a 
new frame arrives before the CCDC is restarted the frame will be dropped, but 
the CCDC might lose synchronization as well (this would need to be verified, 
the OMAP3 ISP hardware is pretty sensitive to such issues, but I don't 
remember from the top of my head the details of what synchronization problems 
affect each block).

> > Has this behavior changed in recent versions?

The overall behaviour shouldn't have changed, no.

> > I see from the ISP block diagram that the "circular buffer" is between the
> > SBL and the MMU. Could this maybe be used to help the situation? It seems
> > to currently not be used at all along this path.

Not that I know of. The circular buffer allows allocating less physical memory 
than what would be required to store a full frame, if the consumer can process 
image data as it gets written to memory. The memory buffer then essentially 
acts as a FIFO.

> The way the hardware is controlled has stayed the same for a very long time.
> My recollection matches with your findings --- even if double buffering of
> the buffer pointers would be available in some situations, it isn't used by
> the driver. You might ask why, and the reason for that is that there are
> tonds of other things that typically need to be configured (as a result of
> the configuration given by the user using the private IOCTLs) at that very
> time. If a block becomes busy while you're configuring it you can say good
> bye to your frame in any case; whether yousd set up writing it to system
> memory using DMA or not...

Several CCDC registers are latched by the VS sync pulse. It might thus be 
possible to reconfigure the CCDC right after frame start instead of right 
after frame end.

> What comes to the minimum time per frames, I could give you a guesstimate of
> 1 ms. It depends a lot on how well other drivers in the system behave, but
> in general that should be enough. Something must be very wrong if you need
> significantly more than that.

-- 
Regards,

Laurent Pinchart


      reply	other threads:[~2013-06-18 15:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 16:16 double-buffering with the omap3 parallel interface Michael Jones
2013-06-16 23:44 ` Sakari Ailus
2013-06-18 15:18   ` Laurent Pinchart [this message]

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=2509851.dYUFSdVPB5@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=michael.jones@matrix-vision.de \
    --cc=sakari.ailus@iki.fi \
    /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