Re: [PATCH] [media] videobuf2-core: call __setup_offsets only for mmap memory type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pawel,

Am Donnerstag, den 19.09.2013, 16:54 +0900 schrieb Pawel Osciak:
> On Thu, Sep 19, 2013 at 4:37 PM, Philipp Zabel <p.zabel@xxxxxxxxxxxxxx> wrote:
> > __setup_offsets fills the v4l2_planes' mem_offset fields, which is only valid
> > for V4L2_MEMORY_MMAP type buffers. For V4L2_MEMORY_DMABUF and _USERPTR buffers,
> > this incorrectly overwrites the fd and userptr fields.
> 
> I'm not particularly against this change, but I'm curious if anything
> that you were doing was broken by this call? The buffers are created
> here, so their fields don't contain anything that could be overwritten
> (although keeping them at 0 is preferable).

nothing was actually broken, but even though the spec doesn't say
anything about the QUERYBUF return values in the DMABUF/USERPTR cases,
setting them to some random initial value doesn't seem right.

Maybe the documentation could be amended to mention fd and userptr,
although in this case the fd should probably be set to -1 initially.
QUERYBUF could then be used to find free slots.

regards
Philipp

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux