drm/msm: Stop using iommu_present()
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Thu, 16 Jun 2022 08:11:04 +0000 (11:11 +0300)
committerRob Clark <robdclark@chromium.org>
Thu, 7 Jul 2022 01:54:13 +0000 (18:54 -0700)
commit8cb72adb1c6618c77fdf3e7c8acd8876d6d1b0b7
tree8c0b895276d528f64cf1c52646e65d1b0aa8762f
parent8010b14e6219c0060716c885a89658060a388544
drm/msm: Stop using iommu_present()

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.

On Qualcomm platforms the IOMMU can be specified either for the MDP/DPU
device or for its parent MDSS device depending on the actual platform.
Check both of them, since that is how both DPU and MDP5 drivers work.

Co-developed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/489699/
Link: https://lore.kernel.org/r/20220616081106.350262-4-dmitry.baryshkov@linaro.org
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/msm_drv.c