[PATCH v3] drm/mediatek: Stop using iommu_present()

Chun-Kuang Hu chunkuang.hu at kernel.org
Thu Dec 7 15:31:56 PST 2023


Hi, Robin:

Robin Murphy <robin.murphy at arm.com> 於 2023年11月23日 週四 下午9:41寫道:
>
> Remove the pointless check. If an IOMMU is providing transparent DMA API
> ops for any device(s) we care about, the DT code will have enforced the
> appropriate probe ordering already. And if the IOMMU *is* entirely
> absent, then attempting to go ahead with CMA and either suceeding or
> failing decisively seems more useful than deferring forever.

Applied to mediatek-drm-next [1], thanks.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next

Regards,
Chun-Kuang.

>
> Signed-off-by: Robin Murphy <robin.murphy at arm.com>
> ---
>
> I realised that last time I sent this I probably should have CCed a
> wider audience of reviewers, so here's one with an updated commit
> message as well to make the resend more worthwhile.
>
>  drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> index 2dfaa613276a..48581da51857 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> @@ -5,7 +5,6 @@
>   */
>
>  #include <linux/component.h>
> -#include <linux/iommu.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
>  #include <linux/of_platform.h>
> @@ -608,9 +607,6 @@ static int mtk_drm_bind(struct device *dev)
>         struct drm_device *drm;
>         int ret, i;
>
> -       if (!iommu_present(&platform_bus_type))
> -               return -EPROBE_DEFER;
> -
>         pdev = of_find_device_by_node(private->mutex_node);
>         if (!pdev) {
>                 dev_err(dev, "Waiting for disp-mutex device %pOF\n",
> --
> 2.39.2.101.g768bb238c484.dirty
>



More information about the Linux-mediatek mailing list