[PATCH v3 0/2] drm: Add shmem GEM library

Thomas Hellstrom thomas at shipmail.org
Fri Sep 14 15:48:44 UTC 2018


Hi, Noralf,

On 09/11/2018 02:43 PM, Noralf Trønnes wrote:
> This patchset adds a library for shmem backed GEM objects and makes use
> of it in tinydrm.
>
> When I made tinydrm I used the CMA helper because it was very easy to
> use. July last year I learned that this limits which drivers to PRIME
> import from, since CMA requires continuous memory. tinydrm drivers don't
> require that. So I set out to change that looking first at shmem, but
> that wasn't working since shmem didn't work with fbdev deferred I/O.
> Then I did a vmalloc buffer attempt which worked with deferred I/O, but
> maybe wouldn't be of so much use as a library for other drivers to use.
> As my work to split out stuff from the CMA helper for shared use came to
> an end, I had a generic fbdev emulation that uses a shadow buffer for
> deferred I/O.
> This means that I can now use shmem buffers after all.
>
> I have looked at the other drivers that use drm_gem_get_pages() and
> several supports different cache modes so I've done that even though
> tinydrm only uses the cached one.
Out if interest, how can you use writecombine and uncached with shared 
memory?
as typically the linear kernel map of the affected pages also needs 
changing?

Thanks,
Thomas



More information about the dri-devel mailing list