diff options
author | Thierry Reding <treding@nvidia.com> | 2019-09-16 16:19:25 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2019-09-17 14:50:16 +1000 |
commit | 641f53c07d2760f1a53288c3cab0300030f049cb (patch) | |
tree | bf3a033bc07e7d512dab9bf5e7fb2e5492ae0edf /drivers/gpu/drm/nouveau/nouveau_gem.c | |
parent | 0bb21c9677e5a5e2355f4f81a4e48afe62257a75 (diff) | |
download | lwn-641f53c07d2760f1a53288c3cab0300030f049cb.tar.gz lwn-641f53c07d2760f1a53288c3cab0300030f049cb.zip |
drm/nouveau: Fix ordering between TTM and GEM release
When the last reference to a TTM BO is dropped, ttm_bo_release() will
acquire the DMA reservation object's wound/wait mutex while trying to
clean up (ttm_bo_cleanup_refs_or_queue() via ttm_bo_release()). It is
therefore essential that drm_gem_object_release() be called after the
TTM BO has been uninitialized, otherwise drm_gem_object_release() has
already destroyed the wound/wait mutex (via dma_resv_fini()).
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_gem.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_gem.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 1bdffd714456..1324c19f4e5c 100644 --- a/drivers/gpu/drm/nouveau/nouveau_gem.c +++ b/drivers/gpu/drm/nouveau/nouveau_gem.c @@ -51,10 +51,6 @@ nouveau_gem_object_del(struct drm_gem_object *gem) if (gem->import_attach) drm_prime_gem_destroy(gem, nvbo->bo.sg); - drm_gem_object_release(gem); - - /* reset filp so nouveau_bo_del_ttm() can test for it */ - gem->filp = NULL; ttm_bo_put(&nvbo->bo); pm_runtime_mark_last_busy(dev); |