From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH v4 2/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping Date: Thu, 31 May 2018 09:12:47 -0700 Message-ID: <20180531161247.GA10203@infradead.org> References: <20180530140625.21247-1-thierry.reding@gmail.com> <20180530140625.21247-3-thierry.reding@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20180530140625.21247-3-thierry.reding@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: Thierry Reding Cc: nouveau@lists.freedesktop.org, Joerg Roedel , Russell King , dri-devel@lists.freedesktop.org, Christoph Hellwig , Jordan Crouse , iommu@lists.linux-foundation.org, Ben Skeggs , Daniel Vetter , linux-tegra@vger.kernel.org, Robin Murphy , linux-arm-kernel@lists.infradead.org List-Id: iommu@lists.linux-foundation.org > +#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU) > + if (dev->archdata.mapping) { > + struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); > + > + arm_iommu_detach_device(dev); > + arm_iommu_release_mapping(mapping); > + } > +#endif Having this hidden in a helper would be nicer, but anything that doesn't directly expose the dma_map_ops to a driver is fine with me. So from the dma-mapping POV: Acked-by: Christoph Hellwig