linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Osipenko <digetx@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Mikko Perttunen <mperttunen@nvidia.com>
Subject: Re: [PATCH 1/2] drm/tegra: Fix order of teardown in IOMMU case
Date: Mon, 23 Apr 2018 11:35:14 +0300	[thread overview]
Message-ID: <51f0d03d-afc3-c05f-dbf6-f3710e6f70ba@gmail.com> (raw)
In-Reply-To: <20180423065745.26102-1-thierry.reding@gmail.com>

On 23.04.2018 09:57, Thierry Reding wrote:
> 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>
Reviewed-by: Dmitry Osipenko <digetx@gmail.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);
> 

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

  parent reply	other threads:[~2018-04-23  8:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Dmitry Osipenko [this message]
2018-05-14  8:59   ` [PATCH 1/2] drm/tegra: Fix order of teardown in IOMMU case Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51f0d03d-afc3-c05f-dbf6-f3710e6f70ba@gmail.com \
    --to=digetx@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).