[PATCH] dma-buf: Expose buffer size to userspace (v2)

2013-09-03 Thread Christopher James Halse Rogers
Signed-off-by: Christopher James Halse Rogers Reviewed-by: Daniel Vetter Tested-by: Daniel Vetter --- Documentation/dma-buf-sharing.txt | 12 drivers/base/dma-buf.c| 28 2 files changed, 40 insertions(+) diff --git a/Documentation/dma-buf-s

[PATCH] dma-buf: Expose buffer size to userspace

2013-08-04 Thread Christopher James Halse Rogers
Each dma-buf has an associated size and it's reasonable for userspace to want to know what it is. Since userspace already has an fd, expose the size using the size = lseek(fd, SEEK_END, 0); lseek(fd, SEEK_CUR, 0); idiom. Signed-off-by: Christopher James Halse Rogers --- I've run in