Re: [PATCH] drm/nouveau/tegra: Stop using iommu_present()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Whoops! Was going through my unread emails and noticed I somehow missed this
patch last month.

Reviewed-by: Lyude Paul <lyude@xxxxxxxxxx>

I will push this to drm-misc-fixes in a little bit (assuming I don't find it
there already)

On Tue, 2022-04-05 at 15:21 +0100, Robin Murphy wrote:
> Even if some IOMMU has registered itself on the platform "bus", that
> doesn't necessarily mean it provides translation for the device we
> care about. Replace iommu_present() with a more appropriate check.
> 
> Signed-off-by: Robin Murphy <robin.murphy@xxxxxxx>
> ---
>  drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> index 992cc285f2fe..2ed528c065fa 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c
> @@ -123,7 +123,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra
> *tdev)
>  
>         mutex_init(&tdev->iommu.mutex);
>  
> -       if (iommu_present(&platform_bus_type)) {
> +       if (device_iommu_mapped(dev)) {
>                 tdev->iommu.domain = iommu_domain_alloc(&platform_bus_type);
>                 if (!tdev->iommu.domain)
>                         goto error;

-- 
Cheers,
 Lyude Paul (she/her)
 Software Engineer at Red Hat




[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux