[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20211206124033.GY4670@nvidia.com>
Date: Mon, 6 Dec 2021 08:40:33 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Lu Baolu <baolu.lu@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Joerg Roedel <joro@...tes.org>,
Alex Williamson <alex.williamson@...hat.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Christoph Hellwig <hch@...radead.org>,
Kevin Tian <kevin.tian@...el.com>,
Ashok Raj <ashok.raj@...el.com>, Will Deacon <will@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Dan Williams <dan.j.williams@...el.com>, rafael@...nel.org,
Diana Craciun <diana.craciun@....nxp.com>,
Cornelia Huck <cohuck@...hat.com>,
Eric Auger <eric.auger@...hat.com>,
Liu Yi L <yi.l.liu@...el.com>,
Jacob jun Pan <jacob.jun.pan@...el.com>,
Chaitanya Kulkarni <kch@...dia.com>,
Stuart Yoder <stuyoder@...il.com>,
Laurentiu Tudor <laurentiu.tudor@....com>,
Thierry Reding <thierry.reding@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Jonathan Hunter <jonathanh@...dia.com>,
Li Yang <leoyang.li@....com>,
Dmitry Osipenko <digetx@...il.com>,
iommu@...ts.linux-foundation.org, linux-pci@...r.kernel.org,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 18/18] drm/tegra: Use the iommu dma_owner mechanism
On Mon, Dec 06, 2021 at 09:59:03AM +0800, Lu Baolu wrote:
> @@ -941,48 +944,44 @@ int host1x_client_iommu_attach(struct host1x_client *client)
> * not the shared IOMMU domain, don't try to attach it to a different
> * domain. This allows using the IOMMU-backed DMA API.
> */
> - if (domain && domain != tegra->domain)
> + client->group = NULL;
> + if (!client->dev->iommu_group || (domain && domain != tegra->domain))
> + return iommu_device_set_dma_owner(client->dev,
> + DMA_OWNER_DMA_API, NULL);
> +
> + if (!tegra->domain)
> return 0;
This if should be removed completely now
Jason
Powered by blists - more mailing lists