[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7031938c.673c.1914592a773.Coremail.andyshrk@163.com>
Date: Mon, 12 Aug 2024 15:52:04 +0800 (CST)
From: "Andy Yan" <andyshrk@....com>
To: "Lu Baolu" <baolu.lu@...ux.intel.com>
Cc: "Karol Herbst" <kherbst@...hat.com>, "Lyude Paul" <lyude@...hat.com>,
"Danilo Krummrich" <dakr@...hat.com>,
"David Airlie" <airlied@...il.com>,
"Daniel Vetter" <daniel@...ll.ch>,
"Thierry Reding" <thierry.reding@...il.com>,
"Jonathan Hunter" <jonathanh@...dia.com>,
"Sandy Huang" <hjc@...k-chips.com>,
"Maarten Lankhorst" <maarten.lankhorst@...ux.intel.com>,
"Maxime Ripard" <mripard@...nel.org>,
"Thomas Zimmermann" <tzimmermann@...e.de>,
"Mikko Perttunen" <mperttunen@...dia.com>,
"Joerg Roedel" <joro@...tes.org>, "Will Deacon" <will@...nel.org>,
"Robin Murphy" <robin.murphy@....com>,
"Jason Gunthorpe" <jgg@...pe.ca>,
"Kevin Tian" <kevin.tian@...el.com>, dri-devel@...ts.freedesktop.org,
nouveau@...ts.freedesktop.org, linux-tegra@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-media@...r.kernel.org,
iommu@...ts.linux.dev, linux-kernel@...r.kernel.org,
"Jason Gunthorpe" <jgg@...dia.com>
Subject: Re:[PATCH 2/3] drm/rockchip: Use iommu_paging_domain_alloc()
Hi,
Thanks for your patch
At 2024-08-12 15:10:33, "Lu Baolu" <baolu.lu@...ux.intel.com> wrote:
>Commit <421be3ee36a4> ("drm/rockchip: Refactor IOMMU initialisation") has
>refactored rockchip_drm_init_iommu() to pass a device that the domain is
>allocated for. Replace iommu_domain_alloc() with
>iommu_paging_domain_alloc() to retire the former.
>
>Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com>
>Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
>Link: https://lore.kernel.org/r/20240610085555.88197-19-baolu.lu@linux.intel.com
Acked-by: Andy Yan <andyshrk@....com>
>---
> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>index 44d769d9234d..11e5d10de4d7 100644
>--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>@@ -103,13 +103,17 @@ static int rockchip_drm_init_iommu(struct drm_device *drm_dev)
> struct rockchip_drm_private *private = drm_dev->dev_private;
> struct iommu_domain_geometry *geometry;
> u64 start, end;
>+ int ret;
>
> if (IS_ERR_OR_NULL(private->iommu_dev))
> return 0;
>
>- private->domain = iommu_domain_alloc(private->iommu_dev->bus);
>- if (!private->domain)
>- return -ENOMEM;
>+ private->domain = iommu_paging_domain_alloc(private->iommu_dev);
>+ if (IS_ERR(private->domain)) {
>+ ret = PTR_ERR(private->domain);
>+ private->domain = NULL;
>+ return ret;
>+ }
>
> geometry = &private->domain->geometry;
> start = geometry->aperture_start;
>--
>2.34.1
>
Powered by blists - more mailing lists