All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/tegra: Fix order of teardown in IOMMU case
@ 2018-04-23  6:57 Thierry Reding
  2018-04-23  6:57 ` [PATCH 2/2] drm/tegra: Acquire a reference to the IOVA cache Thierry Reding
  2018-04-23  8:35 ` [PATCH 1/2] drm/tegra: Fix order of teardown in IOMMU case Dmitry Osipenko
  0 siblings, 2 replies; 10+ messages in thread
From: Thierry Reding @ 2018-04-23  6:57 UTC (permalink / raw)
  To: Thierry Reding; +Cc: linux-tegra, Dmitry Osipenko, dri-devel, Mikko Perttunen

From: Thierry Reding <treding@nvidia.com>

The original code works fine, this is merely a cosmetic change to make
the teardown order the reverse of the setup order.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/tegra/drm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index 1cfe1e7e2feb..4a696fa274a3 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -207,10 +207,10 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags)
 	drm_mode_config_cleanup(drm);
 
 	if (tegra->domain) {
-		iommu_domain_free(tegra->domain);
-		drm_mm_takedown(&tegra->mm);
 		mutex_destroy(&tegra->mm_lock);
+		drm_mm_takedown(&tegra->mm);
 		put_iova_domain(&tegra->carveout.domain);
+		iommu_domain_free(tegra->domain);
 	}
 free:
 	kfree(tegra);
@@ -233,10 +233,10 @@ static void tegra_drm_unload(struct drm_device *drm)
 		return;
 
 	if (tegra->domain) {
-		iommu_domain_free(tegra->domain);
-		drm_mm_takedown(&tegra->mm);
 		mutex_destroy(&tegra->mm_lock);
+		drm_mm_takedown(&tegra->mm);
 		put_iova_domain(&tegra->carveout.domain);
+		iommu_domain_free(tegra->domain);
 	}
 
 	kfree(tegra);
-- 
2.17.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-05-17 12:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23  6:57 [PATCH 1/2] drm/tegra: Fix order of teardown in IOMMU case Thierry Reding
2018-04-23  6:57 ` [PATCH 2/2] drm/tegra: Acquire a reference to the IOVA cache Thierry Reding
2018-04-23  8:34   ` Dmitry Osipenko
2018-04-23  8:41     ` Dmitry Osipenko
2018-04-23  8:43       ` Dmitry Osipenko
2018-05-14  9:02         ` Thierry Reding
2018-05-17 10:53   ` Dmitry Osipenko
2018-05-17 12:09     ` Thierry Reding
2018-04-23  8:35 ` [PATCH 1/2] drm/tegra: Fix order of teardown in IOMMU case Dmitry Osipenko
2018-05-14  8:59   ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.