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

2022-05-11 Thread Dmitry Osipenko
On 5/4/22 14:52, Robin Murphy wrote: > On 2022-05-04 01:52, Dmitry Osipenko wrote: >> On 4/11/22 16:46, Robin Murphy wrote: >>> @@ -1092,6 +1092,19 @@ static bool host1x_drm_wants_iommu(struct >>> host1x_device *dev) >>>   struct host1x *host1x = dev_get_drvdata(dev->dev.parent); >>>   stru

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

2022-05-04 Thread Robin Murphy
On 2022-05-04 01:52, Dmitry Osipenko wrote: On 4/11/22 16:46, Robin Murphy wrote: @@ -1092,6 +1092,19 @@ static bool host1x_drm_wants_iommu(struct host1x_device *dev) struct host1x *host1x = dev_get_drvdata(dev->dev.parent); struct iommu_domain *domain; + /* For starters, thi

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

2022-05-03 Thread Dmitry Osipenko
On 4/11/22 16:46, Robin Murphy wrote: > @@ -1092,6 +1092,19 @@ static bool host1x_drm_wants_iommu(struct > host1x_device *dev) > struct host1x *host1x = dev_get_drvdata(dev->dev.parent); > struct iommu_domain *domain; > > + /* For starters, this is moot if no IOMMU is available *

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

2022-04-13 Thread Dmitry Osipenko
On 4/11/22 16:46, Robin Murphy wrote: > Refactor the confusing logic to make it both clearer and more robust. If > the host1x parent device does have an IOMMU domain then iommu_present() > is redundantly true, while otherwise for the 32-bit DMA mask case it > still doesn't say whether the IOMMU dri

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

2022-04-11 Thread Robin Murphy
Refactor the confusing logic to make it both clearer and more robust. If the host1x parent device does have an IOMMU domain then iommu_present() is redundantly true, while otherwise for the 32-bit DMA mask case it still doesn't say whether the IOMMU driver actually knows about the DRM device or not