[PATCH] dma-buf: heap-helpers: Set dma-buf exporter name

John Stultz john.stultz at linaro.org
Sat Aug 15 02:19:45 UTC 2020


On Fri, Aug 14, 2020 at 7:25 AM Ezequiel Garcia <ezequiel at collabora.com> wrote:
>
> Currently the heap helper uses DEFINE_DMA_BUF_EXPORT_INFO,
> which uses KBUILD_MODNAME for the dma_buf_export_info.exp_name.
>
> This effectively makes all dma-bufs exported by the heap
> helper as coming from "heap-helpers", instead of the actual heap name
> (cma, system, etc).
>
> Fix this by adding a dma-heap name getter, and then setting
> dma_buf_export_info.exp_name.
>
> Signed-off-by: Ezequiel Garcia <ezequiel at collabora.com>

Untested, but looks sane to me.

Acked-by: John Stultz <john.stultz at linaro.org>

On a slightly related note, I'm starting to regret the current
heap-helpers approach (Andrew probably gets an "I told you so" there
:). While it avoids a lot of duplication, it's really an all or
nothing approach, and doesn't really compare well to other drm style
helper functions.  I may eventually try to break the system and cma
implementations out of the helper code and try to consider a different
approach to avoid the duplication.

thanks
-john


More information about the dri-devel mailing list