diff mbox series

[v2,1/3] drm/nouveau/tegra: Use iommu_paging_domain_alloc()

Message ID 20240902014700.66095-2-baolu.lu@linux.intel.com
State New
Headers show
Series drm: Use iommu_paging_domain_alloc() | expand

Commit Message

Baolu Lu Sept. 2, 2024, 1:46 a.m. UTC
In nvkm_device_tegra_probe_iommu(), a paging domain is allocated for @dev
and attached to it on success. Use iommu_paging_domain_alloc() to make it
explicit.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Lyude Paul Sept. 4, 2024, 7:06 p.m. UTC | #1
Reviewed-by: Lyude Paul <lyude@redhat.com>

Will handle pushing it to drm-misc in just a moment

On Mon, 2024-09-02 at 09:46 +0800, Lu Baolu wrote:
> In nvkm_device_tegra_probe_iommu(), a paging domain is allocated for @dev
> and attached to it on success. Use iommu_paging_domain_alloc() to make it
> explicit.
> 
> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> ---
>  drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> index 87caa4a72921..763c4c2925f9 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> @@ -120,8 +120,8 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
>  	mutex_init(&tdev->iommu.mutex);
>  
>  	if (device_iommu_mapped(dev)) {
> -		tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);
> -		if (!tdev->iommu.domain)
> +		tdev->iommu.domain = iommu_paging_domain_alloc(dev);
> +		if (IS_ERR(tdev->iommu.domain))
>  			goto error;
>  
>  		/*
Jason Gunthorpe Sept. 5, 2024, 1:24 p.m. UTC | #2
On Wed, Sep 04, 2024 at 03:06:07PM -0400, Lyude Paul wrote:
> Reviewed-by: Lyude Paul <lyude@redhat.com>
> 
> Will handle pushing it to drm-misc in just a moment

Did you just take this one patch? 

Who will take the rest of the series for DRM?

Jason
Lyude Paul Sept. 5, 2024, 4:26 p.m. UTC | #3
I did take the one patch - but I'm happy to push the others to drm-misc
(provided they all get reviewed. 2/3 seems to be reviewed already but not 3/3)

On Thu, 2024-09-05 at 10:24 -0300, Jason Gunthorpe wrote:
> On Wed, Sep 04, 2024 at 03:06:07PM -0400, Lyude Paul wrote:
> > Reviewed-by: Lyude Paul <lyude@redhat.com>
> > 
> > Will handle pushing it to drm-misc in just a moment
> 
> Did you just take this one patch? 
> 
> Who will take the rest of the series for DRM?
> 
> Jason
>
Thierry Reding Sept. 9, 2024, 1:50 p.m. UTC | #4
On Mon, Sep 02, 2024 at 09:46:58AM GMT, Lu Baolu wrote:
> In nvkm_device_tegra_probe_iommu(), a paging domain is allocated for @dev
> and attached to it on success. Use iommu_paging_domain_alloc() to make it
> explicit.
> 
> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> ---
>  drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>
Jason Gunthorpe Sept. 9, 2024, 1:51 p.m. UTC | #5
On Thu, Sep 05, 2024 at 12:26:31PM -0400, Lyude Paul wrote:
> I did take the one patch - but I'm happy to push the others to drm-misc
> (provided they all get reviewed. 2/3 seems to be reviewed already but not 3/3)

The whole series is acked now, can you pick it up please?

Thanks,
Jason
Lyude Paul Sept. 10, 2024, 7:34 p.m. UTC | #6
of course - will push in just a moment

On Mon, 2024-09-09 at 10:51 -0300, Jason Gunthorpe wrote:
> On Thu, Sep 05, 2024 at 12:26:31PM -0400, Lyude Paul wrote:
> > I did take the one patch - but I'm happy to push the others to drm-misc
> > (provided they all get reviewed. 2/3 seems to be reviewed already but not 3/3)
> 
> The whole series is acked now, can you pick it up please?
> 
> Thanks,
> Jason
>
Jason Gunthorpe Sept. 15, 2024, 2:08 p.m. UTC | #7
On Thu, Sep 05, 2024 at 12:26:31PM -0400, Lyude Paul wrote:
> I did take the one patch - but I'm happy to push the others to drm-misc
> (provided they all get reviewed. 2/3 seems to be reviewed already but not 3/3)

Did it get lost?

$ git reset --hard next-20240913
$ git grep 'iommu_domain_alloc(' drivers/gpu/
drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c:		tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);

??

 drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c |  4 ++--
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c        | 10 +++++++---
 drivers/gpu/drm/tegra/drm.c                        |  5 +++--

Now we have the other two but not nouveau?

Jason
diff mbox series

Patch

diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
index 87caa4a72921..763c4c2925f9 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
@@ -120,8 +120,8 @@  nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev)
 	mutex_init(&tdev->iommu.mutex);
 
 	if (device_iommu_mapped(dev)) {
-		tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);
-		if (!tdev->iommu.domain)
+		tdev->iommu.domain = iommu_paging_domain_alloc(dev);
+		if (IS_ERR(tdev->iommu.domain))
 			goto error;
 
 		/*