Re: [RFC PATCH 4/5] drm/panthor: Add support for protected memory allocation in panthor

Boris Brezillon
2025-02-11T11:22:43Z

On Tue, 11 Feb 2025 12:04:48 +0100
Boris Brezillon <boris.brezillon@collabora.com> wrote:

> > --- a/drivers/gpu/drm/panthor/panthor_gem.c
> > +++ b/drivers/gpu/drm/panthor/panthor_gem.c
> > @@ -9,10 +9,14 @@
> >
> > #include <drm/panthor_drm.h>
> >
> > +#include <uapi/linux/dma-heap.h>
> > +
> > #include "panthor_device.h"
> > #include "panthor_gem.h"
> > #include "panthor_mmu.h"
> >
> > +MODULE_IMPORT_NS(DMA_BUF);
>
> Uh, that's ugly. If the consensus is to let panthor allocate
> its protected buffers from a heap, let's just add a dependency on
> DMABUF_HEAPS instead.

My bad, that one is required for dma_buf_put(). Should be

MODULE_IMPORT_NS("DMA_BUF");

though.