All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Should a index be passed on the fly with the VIDIOC_QBUF ioctl in V4L2_MEMORY_USERPTR case ?
       [not found] <AANLkTinzO2BN7AbRgqoKzO7-2ay385CZHAaNGZB2fcKO@mail.gmail.com>
@ 2010-12-14 10:51 ` Jonghun Han
  2010-12-14 11:00   ` Laurent Pinchart
  0 siblings, 1 reply; 3+ messages in thread
From: Jonghun Han @ 2010-12-14 10:51 UTC (permalink / raw)
  To: linux-media; +Cc: 'Hans Verkuil', mchehab


Hi,

Any comment for this ?

In my opinion v4l2 spec is not accurate in this topic.
Because VIDIOC_REQBUFS describes count is only used in V4L2_MEMORY_MMAP as
below.
__u32	count	The number of buffers requested or granted. This field is
only used when memory is set to V4L2_MEMORY_MMAP.

But there is no comment in QBUF and DQBUF part about index.
So I am confused. If an index isn't needed, how to driver handle it ?

Best regards,
Jonghun Han,

> -----Original Message-----
> From: linux-media-owner@vger.kernel.org [mailto:linux-media-
> owner@vger.kernel.org] On Behalf Of Jonghun Han
> Sent: Saturday, December 11, 2010 2:10 PM
> To: linux-media@vger.kernel.org
> Subject: Should a index be passed on the fly with the VIDIOC_QBUF ioctl in
> V4L2_MEMORY_USERPTR case ?
> 
> Hi,
> 
> I wonder that a index should be passed on the fly with the VIDIOC_QBUF
> ioctl in V4L2_MEMORY_USERPTR case.
> If it isn't needed, should driver return virtual address gotten from
> application on the fly with the VIDIOC_DQBUF ioctl ?
> 
> Best regards,
> Jonghun Han,
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: Should a index be passed on the fly with the VIDIOC_QBUF ioctl in V4L2_MEMORY_USERPTR case ?
  2010-12-14 10:51 ` Should a index be passed on the fly with the VIDIOC_QBUF ioctl in V4L2_MEMORY_USERPTR case ? Jonghun Han
@ 2010-12-14 11:00   ` Laurent Pinchart
  2010-12-14 11:19     ` Jonghun Han
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent Pinchart @ 2010-12-14 11:00 UTC (permalink / raw)
  To: Jonghun Han; +Cc: linux-media, 'Hans Verkuil', mchehab

Hi Jonghun,

On Tuesday 14 December 2010 11:51:17 Jonghun Han wrote:
> Hi,
> 
> Any comment for this ?
> 
> In my opinion v4l2 spec is not accurate in this topic.
> Because VIDIOC_REQBUFS describes count is only used in V4L2_MEMORY_MMAP as
> below.
> __u32	count	The number of buffers requested or granted. This field is
> only used when memory is set to V4L2_MEMORY_MMAP.
> 
> But there is no comment in QBUF and DQBUF part about index.
> So I am confused. If an index isn't needed, how to driver handle it ?

The spec should be fixed. VIDIOC_REQBUFS needs to be called for USERPTR as 
well, and the buffer count is definitely used.

> On Saturday, December 11, 2010 2:10 PM Jonghun Han wrote:
> > 
> > I wonder that a index should be passed on the fly with the VIDIOC_QBUF
> > ioctl in V4L2_MEMORY_USERPTR case.
> > If it isn't needed, should driver return virtual address gotten from
> > application on the fly with the VIDIOC_DQBUF ioctl ?

VIDIOC_DQBUF is supposed to fill the v4l2_buffer structure with the index and 
the userspace virtual address (among other information). If it doesn't, it's a 
driver bug.

-- 
Regards,

Laurent Pinchart

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

* RE: Should a index be passed on the fly with the VIDIOC_QBUF ioctl in V4L2_MEMORY_USERPTR case ?
  2010-12-14 11:00   ` Laurent Pinchart
@ 2010-12-14 11:19     ` Jonghun Han
  0 siblings, 0 replies; 3+ messages in thread
From: Jonghun Han @ 2010-12-14 11:19 UTC (permalink / raw)
  To: 'Laurent Pinchart'; +Cc: linux-media


Hi Laurent Pinchart,

Thanks you for reply.
It makes sense.

Best regards,
Jonghun Han

> -----Original Message-----
> From: linux-media-owner@vger.kernel.org [mailto:linux-media-
> owner@vger.kernel.org] On Behalf Of Laurent Pinchart
> Sent: Tuesday, December 14, 2010 8:00 PM
> To: Jonghun Han
> Cc: linux-media@vger.kernel.org; 'Hans Verkuil'; mchehab@redhat.com
> Subject: Re: Should a index be passed on the fly with the VIDIOC_QBUF
ioctl in
> V4L2_MEMORY_USERPTR case ?
> 
> Hi Jonghun,
> 
> On Tuesday 14 December 2010 11:51:17 Jonghun Han wrote:
> > Hi,
> >
> > Any comment for this ?
> >
> > In my opinion v4l2 spec is not accurate in this topic.
> > Because VIDIOC_REQBUFS describes count is only used in
> V4L2_MEMORY_MMAP as
> > below.
> > __u32	count	The number of buffers requested or granted. This
field is
> > only used when memory is set to V4L2_MEMORY_MMAP.
> >
> > But there is no comment in QBUF and DQBUF part about index.
> > So I am confused. If an index isn't needed, how to driver handle it ?
> 
> The spec should be fixed. VIDIOC_REQBUFS needs to be called for USERPTR as
> well, and the buffer count is definitely used.
> 
> > On Saturday, December 11, 2010 2:10 PM Jonghun Han wrote:
> > >
> > > I wonder that a index should be passed on the fly with the VIDIOC_QBUF
> > > ioctl in V4L2_MEMORY_USERPTR case.
> > > If it isn't needed, should driver return virtual address gotten from
> > > application on the fly with the VIDIOC_DQBUF ioctl ?
> 
> VIDIOC_DQBUF is supposed to fill the v4l2_buffer structure with the index
and
> the userspace virtual address (among other information). If it doesn't,
it's a
> driver bug.
> 
> --
> Regards,
> 
> Laurent Pinchart
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

end of thread, other threads:[~2010-12-14 11:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AANLkTinzO2BN7AbRgqoKzO7-2ay385CZHAaNGZB2fcKO@mail.gmail.com>
2010-12-14 10:51 ` Should a index be passed on the fly with the VIDIOC_QBUF ioctl in V4L2_MEMORY_USERPTR case ? Jonghun Han
2010-12-14 11:00   ` Laurent Pinchart
2010-12-14 11:19     ` Jonghun Han

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.