[PATCH 3/5] drm/udl: Add GEM object functions for free(), vmap(), and vunmap()

Gerd Hoffmann kraxel at redhat.com
Fri Oct 25 13:32:40 UTC 2019


  Hi,

> > I had a flag to set this in the initial version of the shmem helper
> > modeled after udl, but Thomas Hellstrom brought up a question and it was
> > dropped. The issue was beyond my understanding:
> > 
> > [PATCH v3 0/2] drm: Add shmem GEM library
> > https://lists.freedesktop.org/archives/dri-devel/2018-September/190001.html
> 
> If I understand that discussion correctly, the concern was that write
> combining and shared memory would not work well together. So you went
> with always-cached?
> 
> Just recently, Gerd added unconditional write combining in rev 0be8958936.

Well, it's not really added.  It's the same thing drm_gem_mmap_obj()
does for you when you don't have a drm_gem_object_funcs.mmap callback.

But, yes, the reason this is done in the driver's mmap() callback with
the new mmap code path is to give drivers the option to override this
by supplying their own mmap() handler.  So going with shmem helpers +
custom mmap callback is a reasonable approach.

HTH,
  Gerd



More information about the dri-devel mailing list