diff options
author | Rob Clark <robdclark@chromium.org> | 2023-03-20 17:43:26 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2023-03-26 02:31:44 +0300 |
commit | b14b8c5f0eaf363e33c5410c96a6259dee6bd78e (patch) | |
tree | 427296db2846db1d53cfafa590d3dd94935c3027 /drivers/gpu/drm/msm/msm_gem.h | |
parent | fc2f07566a2cb198eb5902684163e7c4f5309619 (diff) | |
download | linux-b14b8c5f0eaf363e33c5410c96a6259dee6bd78e.tar.xz |
drm/msm: Decouple vma tracking from obj lock
We need to use the inuse count to track that a BO is pinned until
we have the hw_fence. But we want to remove the obj lock from the
job_run() path as this could deadlock against reclaim/shrinker
(because it is blocking the hw_fence from eventually being signaled).
So split that tracking out into a per-vma lock with narrower scope.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/527839/
Link: https://lore.kernel.org/r/20230320144356.803762-5-robdclark@gmail.com
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gem.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gem.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gem.h b/drivers/gpu/drm/msm/msm_gem.h index d3219c523034..1929f09c5b0d 100644 --- a/drivers/gpu/drm/msm/msm_gem.h +++ b/drivers/gpu/drm/msm/msm_gem.h @@ -59,6 +59,7 @@ struct msm_fence_context; struct msm_gem_vma { struct drm_mm_node node; + spinlock_t lock; uint64_t iova; struct msm_gem_address_space *aspace; struct list_head list; /* node in msm_gem_object::vmas */ |