linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sharat Masetty <smasetty@codeaurora.org>
To: freedreno@lists.freedesktop.org
Cc: dri-devel@freedesktop.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, will@kernel.org,
	robin.murphy@arm.com, joro@8bytes.org,
	iommu@lists.linux-foundation.org, jcrouse@codeaurora.org,
	saiprakash.ranjan@codeaurora.org,
	Sharat Masetty <smasetty@codeaurora.org>
Subject: [PATCH v2 5/7] drm: msm: a6xx: Properly free up the iommu objects
Date: Thu,  2 Jan 2020 16:32:11 +0530	[thread overview]
Message-ID: <1577962933-13577-6-git-send-email-smasetty@codeaurora.org> (raw)
In-Reply-To: <1577962933-13577-1-git-send-email-smasetty@codeaurora.org>

This patch calls the right function to destroy the iommu domain as well
as free the associated iommu structure there by facilitating proper
clean up of resources upon failure of creating an address space.

Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
---
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 0d72e6c..ab562f6 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -896,7 +896,7 @@ static unsigned long a6xx_gpu_busy(struct msm_gpu *gpu)

 	aspace = msm_gem_address_space_create(mmu, "gpu", SZ_16M, 0xffffffff);
 	if (IS_ERR(aspace))
-		iommu_domain_free(iommu);
+		mmu->funcs->destroy(mmu);

 	return aspace;
 }
--
1.9.1

  parent reply	other threads:[~2020-01-02 11:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-02 11:02 [PATCH v2 0/7] drm/msm/a6xx: System Cache Support Sharat Masetty
2020-01-02 11:02 ` [PATCH v2 1/7] iommu/arm-smmu: Pass io_pgtable_cfg to impl specific init_context Sharat Masetty
2020-01-31 22:00   ` Matthias Kaehlcke
2020-01-02 11:02 ` [PATCH v2 2/7] iommu/arm-smmu: Add domain attribute for QCOM system cache Sharat Masetty
2020-01-03 19:02   ` [Freedreno] " Rob Clark
2020-01-02 11:02 ` [PATCH v2 3/7] drm/msm: Attach the IOMMU device during initialization Sharat Masetty
2020-01-02 11:02 ` [PATCH v2 4/7] drm/msm: Refactor address space initialization Sharat Masetty
2020-01-02 11:02 ` Sharat Masetty [this message]
2020-01-02 11:02 ` [PATCH v2 6/7] drm/msm: rearrange the gpu_rmw() function Sharat Masetty
2020-01-02 11:02 ` [PATCH v2 7/7] drm/msm/a6xx: Add support for using system cache(LLC) Sharat Masetty

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=1577962933-13577-6-git-send-email-smasetty@codeaurora.org \
    --to=smasetty@codeaurora.org \
    --cc=dri-devel@freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jcrouse@codeaurora.org \
    --cc=joro@8bytes.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=saiprakash.ranjan@codeaurora.org \
    --cc=will@kernel.org \
    /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).