[PATCH 0/5] drm/shmem-helper: Follow-up on 'Switch to reservation lock'

Boris Brezillon boris.brezillon at collabora.com
Mon Jun 26 12:02:42 UTC 2023


Hello,

As mentioned here [1], after rebasing some of my work on
drm-misc-next this morning I noticed that the
drm_gem_shmem_get_pages() I was using to pin pages to a GEM no longer
exists, so I ended up looking at 21aa27ddc582 ("drm/shmem-helper: Switch
to reservation lock") and came up with a few changes to help clarify
the situation.

Note that we will soon need to have drm_gem_shmem_[un]pin_locked()
exposed for the PowerVR and new Mali drivers so we can pin memory
after we've acquired the GEM locks using drm_exec. Not entirely sure
if this should take the form of some generic
drm_gem_[un]pin[_unlocked]() helpers like we have for v[un]map()
operations, or if this should stay shmem-specific.

Regards,

Boris

[1]https://patchwork.freedesktop.org/patch/539994/

Cc: Daniel Vetter <daniel at ffwll.ch>
Cc: Thomas Zimmermann <tzimmermann at suse.de>
Cc: Emil Velikov <emil.l.velikov at gmail.com>
Cc: Dmitry Osipenko <dmitry.osipenko at collabora.com>

Boris Brezillon (5):
  drm/panfrost: Stop using drm_gem_shmem_put_pages()
  drm/shmem-helper: Stop exposing drm_gem_shmem_put_pages()
  drm/shmem-helper: Inline drm_gem_shmem_{get,put}_pages()
  drm/shmem-helper: Make dma_resv_assert_held() unconditional in
    drm_gem_shmem_v[un]map()
  drm/shmem-helper: Clarify drm_gem_shmem_v[un]map() usage

 drivers/gpu/drm/drm_gem_shmem_helper.c  | 125 +++++++++++-------------
 drivers/gpu/drm/panfrost/panfrost_mmu.c |  13 ++-
 include/drm/drm_gem_shmem_helper.h      |   1 -
 3 files changed, 64 insertions(+), 75 deletions(-)

-- 
2.41.0



More information about the dri-devel mailing list