]> git.baikalelectronics.ru Git - kernel.git/commit
dma-buf: add DMA_BUF_SET_NAME ioctls
authorGreg Hackmann <ghackmann@google.com>
Thu, 13 Jun 2019 22:34:07 +0000 (15:34 -0700)
committerSumit Semwal <sumit.semwal@linaro.org>
Fri, 14 Jun 2019 09:30:51 +0000 (15:00 +0530)
commit5b2cbdee193cf71807b6d47e2a17b19f2e6b3811
treecae5b81f60ea2d1ceefd2e2d3bfe3fd4e8aa63da
parentc9ec7b73e487ffa82647d5e7c4074c0407e4e93c
dma-buf: add DMA_BUF_SET_NAME ioctls

This patch adds complimentary DMA_BUF_SET_NAME  ioctls, which lets
userspace processes attach a free-form name to each buffer.

This information can be extremely helpful for tracking and accounting
shared buffers.  For example, on Android, we know what each buffer will
be used for at allocation time: GL, multimedia, camera, etc.  The
userspace allocator can use DMA_BUF_SET_NAME to associate that
information with the buffer, so we can later give developers a
breakdown of how much memory they're allocating for graphics, camera,
etc.

Signed-off-by: Greg Hackmann <ghackmann@google.com>
Signed-off-by: Chenbo Feng <fengc@google.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190613223408.139221-3-fengc@google.com
drivers/dma-buf/dma-buf.c
include/linux/dma-buf.h
include/uapi/linux/dma-buf.h