public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* buffer index when streaming user-ptr buffers
@ 2011-06-14 15:50 Michael Jones
  2011-06-14 17:01 ` Laurent Pinchart
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Jones @ 2011-06-14 15:50 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Laurent Pinchart, Sakari Ailus

In the V4L2 spec, the description for v4l2_buffer.index says "This field
is only used for memory mapping I/O..."

However, in v4l-utils/contrib/capture-example.c, even user-pointer
buffers are indeed given a buf.index before being passed to VIDIOC_QBUF.
 And at least in the OMAP ISP driver, this information is relied upon in
QBUF regardless of V4L2_MEMORY_MMAP/USERPTR.  videobuf-core also uses
v4l2_buffer->index even if b->memory == V4L2_MEMORY_USERPTR.

Is this a bug in the OMAP driver and videobuf-core, and an unnecessary
assignment in capture-example?  Or is the V4L2 spec out of touch/ out of
date?

-Michael

MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: buffer index when streaming user-ptr buffers
  2011-06-14 15:50 buffer index when streaming user-ptr buffers Michael Jones
@ 2011-06-14 17:01 ` Laurent Pinchart
  0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2011-06-14 17:01 UTC (permalink / raw)
  To: Michael Jones; +Cc: Linux Media Mailing List, Sakari Ailus

Hi Michael,

On Tuesday 14 June 2011 17:50:13 Michael Jones wrote:
> In the V4L2 spec, the description for v4l2_buffer.index says "This field
> is only used for memory mapping I/O..."
> 
> However, in v4l-utils/contrib/capture-example.c, even user-pointer
> buffers are indeed given a buf.index before being passed to VIDIOC_QBUF.
>  And at least in the OMAP ISP driver, this information is relied upon in
> QBUF regardless of V4L2_MEMORY_MMAP/USERPTR.  videobuf-core also uses
> v4l2_buffer->index even if b->memory == V4L2_MEMORY_USERPTR.
> 
> Is this a bug in the OMAP driver and videobuf-core, and an unnecessary
> assignment in capture-example?  Or is the V4L2 spec out of touch/ out of
> date?

The spec is out of date. The index field is used for userptr buffers as well.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-14 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-14 15:50 buffer index when streaming user-ptr buffers Michael Jones
2011-06-14 17:01 ` Laurent Pinchart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox