Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bf93f26d authored by Greg Hackmann's avatar Greg Hackmann Committed by Alistair Delva
Browse files

UPSTREAM: 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: default avatarGreg Hackmann <ghackmann@google.com>
Signed-off-by: default avatarChenbo Feng <fengc@google.com>
Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190613223408.139221-3-fengc@google.com
(cherry picked from commit bb2bb903042517b8fb17b2bc21e00512f2dcac01)

Bug: 135613055
Test: run dmabufinfo_test.cpp and check the name is showed up in
      /proc/pid/fd

Change-Id: Ib7f227b5e730c7ecfade14ad596ba3889eab1b0b
parent 107a7b16
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment