dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
	dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org,
	Jesse Barker <jesse.barker@linaro.org>
Subject: Re: Summary of the V4L2 discussions during LDS - was: Re: Embedded Linux memory management interest group list
Date: Thu, 19 May 2011 07:56:26 -0300	[thread overview]
Message-ID: <4DD4F75A.3010308@redhat.com> (raw)
In-Reply-To: <4DD42218.7000302@maxwell.research.nokia.com>

Em 18-05-2011 16:46, Sakari Ailus escreveu:
> Hans Verkuil wrote:
>> Note that many video receivers cannot stall. You can't tell them to wait until
>> the last buffer finished processing. This is different from some/most? sensors.
> 
> Not even image sensors. They just output the frame data; if the receiver
> runs out of buffers the data is just lost. And if any part of the frame
> is lost, there's no use for other parts of it either. But that's
> something the receiver must handle, i.e. discard the data and increment
> frame number (field_count in v4l2_buffer).
> 
> The interfaces used by image sensors, be they parallel or serial, do not
> provide means to inform the sensor that the receiver has run out of
> buffer space. These interfaces are just unidirectional.

Well, it depends on how the hardware works, really. On most (all?) designs, the
IP block responsible to receive data from a sensor (or to transmit data, on an
output device) is capable of generating an IRQ to notify the OS that a 
framebuffer was filled. So, the V4L driver can mark that buffer as finished 
and remove it from the list of the queued buffers. Although the current API's
don't allow to create a new buffer if the list is empty, it may actually make
sense to allow kernel to dynamically create a new buffer, warranting that the
sensor (or receiver) will never run out of buffers under normal usage.

Of course, the maximum number of buffers should be specified, to avoid having
an unacceptable delay. On such case, the frame will end by being discarded.
It makes sense to provide a way to report userspace if this happens.

Mauro.

  reply	other threads:[~2011-05-19 10:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 15:15 Embedded Linux memory management interest group list Jesse Barker
2011-05-14 10:19 ` Summary of the V4L2 discussions during LDS - was: " Mauro Carvalho Chehab
2011-05-14 11:02   ` Hans Verkuil
2011-05-14 11:46     ` Mauro Carvalho Chehab
2011-05-15 21:10       ` Hans Verkuil
2011-05-15 21:27         ` Alan Cox
2011-05-15 23:44           ` Rob Clark
2011-05-17 12:49         ` Mauro Carvalho Chehab
2011-05-17 12:57           ` Mauro Carvalho Chehab
2011-05-18 19:46         ` Sakari Ailus
2011-05-19 10:56           ` Mauro Carvalho Chehab [this message]
2011-05-16 20:45   ` Guennadi Liakhovetski
2011-05-17 16:46     ` Mauro Carvalho Chehab

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=4DD4F75A.3010308@redhat.com \
    --to=mchehab@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil@xs4all.nl \
    --cc=jesse.barker@linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@maxwell.research.nokia.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).