Re: [PATCH v4 02/14] Documentation: media: description of DMABUF importing in V4L2

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

 



On Fri, 20 Apr 2012 10:41:37 +0200, Tomasz Stanislawski
<t.stanislaws@xxxxxxxxxxx> wrote:
>> Am I understanding wrong or are you saying that you want to drop
userptr
>> from V4L2 API in long-term? If so, why?
> 
> Dropping userptr is just some brainstorming idea.
> It was found out that userptr is not a good mean
> for buffer exchange between to two devices.

I can believe that. But I am also inclined to believe that DMABUF is
targetted at device-to-device transfer, while USERPTR is targetted at
device-to-user (or user-to-device) transfers. Are you saying applications
should use DMABUF and memory map the buffers? Or would you care to explain
how DMABUF addresses the problem space of USERPTR?

> The USERPTR simplifies userspace code but introduce
> a lot of complexity problems for the kernel drivers
> and frameworks.

It is not only a simplification. In some cases, USERPTR is the only I/O
method that supports zero copy in pretty much any circumstance. When the
user cannot reliably predict the maximum number of required buffers,
predicts a value larger than the device will negotiate, or needs buffers to
outlive STREAMOFF (?), MMAP requires memory copying. USERPTR does not.

Now, I do realize that some devices cannot support USERPTR efficiently,
then they should not support USERPTR. But for those devices that can, it
seems quite a nice performance enhancement.

-- 
Rémi Denis-Courmont
Sent from my collocated server
--
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