[Mesa-dev] [RFC PATCH] mesa: Export BOs in RW mode
boris.brezillon at collabora.com
Wed Jul 3 13:56:16 UTC 2019
On Wed, 3 Jul 2019 07:45:32 -0600
Rob Herring <robh+dt at kernel.org> wrote:
> On Wed, Jul 3, 2019 at 7:34 AM Boris Brezillon
> <boris.brezillon at collabora.com> wrote:
> > Exported BOs might be imported back, then mmap()-ed to be written
> > too. Most drivers handle that by mmap()-ing the GEM handle after it's
> > been imported, but, according to , this is illegal.
> It's not illegal, but is supposed to go thru the dmabuf mmap
That's basically what I'm proposing here, just didn't post the patch
skipping the GET_OFFSET step and doing the mmap() on the dmabuf FD
instead of the DRM-node one, but I have it working for panfrost.
> However, none of the driver I've looked at (etnaviv, msm,
> v3d, vgem) do that. It probably works because it's the same driver
> doing the import and export or both drivers have essentially the same
Yes, but maybe that's something we should start fixing if mmap()-ing
the dmabuf is the recommended solution.
More information about the mesa-dev