[Intel-gfx] [PATCH 0/9] shmem helper untangling

Boris Brezillon boris.brezillon at collabora.com
Fri May 29 13:52:54 UTC 2020


On Mon, 11 May 2020 11:35:45 +0200
Daniel Vetter <daniel.vetter at ffwll.ch> wrote:

> Hi all,
> 
> I've started this a while ago, with the idea to move shmem helpers over
> to dma_resv_lock. Big prep work for that was to untangle the layering
> between functions called by drivers, and functions used to implement
> drm_gem_object_funcs.
> 
> I didn't ever get to the locking part, but I think the cleanup here are
> worth it stand-alone still.
> 
> Comments, review and testing very much welcome.
> 
> Cheers, Daniel
> 
> Daniel Vetter (9):
>   drm/msm: Don't call dma_buf_vunmap without _vmap
>   drm/gem: WARN if drm_gem_get_pages is called on a private obj
>   drm/doc: Some polish for shmem helpers
>   drm/virtio: Call the right shmem helpers
>   drm/udl: Don't call get/put_pages on imported dma-buf
>   drm/shmem-helpers: Don't call get/put_pages on imported dma-buf in
>     vmap
>   drm/shmem-helpers: Redirect mmap for imported dma-buf
>   drm/shmem-helpers: Ensure get_pages is not called on imported dma-buf
>   drm/shmem-helpers: Simplify dma-buf importing

With the fix suggested on patch 9 (or something similar to initialize
pages_use_count to 1 when importing a dma-buf), this patchset seems to
work on panfrost:

Tested-by: Boris Brezillon <boris.brezillon at collabora.com>

> 
>  Documentation/gpu/drm-kms-helpers.rst   |  12 ---
>  Documentation/gpu/drm-mm.rst            |  12 +++
>  drivers/gpu/drm/drm_gem.c               |   8 ++
>  drivers/gpu/drm/drm_gem_shmem_helper.c  | 128 ++++++++++++++----------
>  drivers/gpu/drm/msm/msm_gem.c           |   3 +-
>  drivers/gpu/drm/udl/udl_gem.c           |  22 ++--
>  drivers/gpu/drm/virtio/virtgpu_object.c |   2 +-
>  7 files changed, 111 insertions(+), 76 deletions(-)
> 



More information about the Intel-gfx mailing list