On Thu, Sep 15, 2011 at 08:53:24AM -0600, Jordan Crouse wrote:
On 09/15/2011 03:31 AM, Sumit Semwal wrote:
I forgot to mention: As per review comments from Hans, and others, the read / write ops are removed for now from both dma_buf_ops and fops of the associated file. Also mmap is made optional.
My summary of the previous mail thread was that everybody ended up agreeing that there is value in the read/write hooks. I know I was convinced that they could be useful.
Can we just ditch them, please ;-)
Really. Imo dma_buf's first concern should be to make buffer sharing possible. That needs absolutely zero support for actually getting at the data from userspace - existing subsystems can do that already. And most of all they (and their userspace parts) already know when it is safe to access a buffer, what kind of dance is required to ensure that and all these things.
So they need to be at least optional (like they're currently are) so e.g. gpu drivers can refuse to implement them. When dma_buf is merged and picks up unforeseen users, they could maybe use such a thing (because they're new and don't yet have any interface), but till that happens, I don't see much use (at least for v1 of dma_buf). -Daniel