[Freedreno] [PATCH 1/5] drm/msm: Remove pm_runtime operations from msm_iommu

Kristian Høgsberg hoegsberg at gmail.com
Tue Jun 12 16:55:14 UTC 2018


On Mon, Jun 11, 2018 at 11:26 AM Jordan Crouse <jcrouse at codeaurora.org> wrote:
>
> Now that the IOMMU is the master of it's own power we don't need to bring
> up the GPU to do IOMMU operations. This is good because bringing up a6xx
> requires the GMU so calling pm_runtime_get_sync() too early in the process
> gets us into some nasty circular dependency situations.
>
> Signed-off-by: Jordan Crouse <jcrouse at codeaurora.org>

Reviewed-by: Kristian H. Kristensen <hoegsberg at google.com>

> ---
>  drivers/gpu/drm/msm/msm_iommu.c | 8 --------
>  1 file changed, 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c
> index b23d33622f37..ccd93ac6a4d8 100644
> --- a/drivers/gpu/drm/msm/msm_iommu.c
> +++ b/drivers/gpu/drm/msm/msm_iommu.c
> @@ -40,9 +40,7 @@ static int msm_iommu_attach(struct msm_mmu *mmu, const char * const *names,
>         struct msm_iommu *iommu = to_msm_iommu(mmu);
>         int ret;
>
> -       pm_runtime_get_sync(mmu->dev);
>         ret = iommu_attach_device(iommu->domain, mmu->dev);
> -       pm_runtime_put_sync(mmu->dev);
>
>         return ret;
>  }
> @@ -52,9 +50,7 @@ static void msm_iommu_detach(struct msm_mmu *mmu, const char * const *names,
>  {
>         struct msm_iommu *iommu = to_msm_iommu(mmu);
>
> -       pm_runtime_get_sync(mmu->dev);
>         iommu_detach_device(iommu->domain, mmu->dev);
> -       pm_runtime_put_sync(mmu->dev);
>  }
>
>  static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova,
> @@ -63,9 +59,7 @@ static int msm_iommu_map(struct msm_mmu *mmu, uint64_t iova,
>         struct msm_iommu *iommu = to_msm_iommu(mmu);
>         size_t ret;
>
> -//     pm_runtime_get_sync(mmu->dev);
>         ret = iommu_map_sg(iommu->domain, iova, sgt->sgl, sgt->nents, prot);
> -//     pm_runtime_put_sync(mmu->dev);
>         WARN_ON(ret < 0);
>
>         return (ret == len) ? 0 : -EINVAL;
> @@ -76,9 +70,7 @@ static int msm_iommu_unmap(struct msm_mmu *mmu, uint64_t iova,
>  {
>         struct msm_iommu *iommu = to_msm_iommu(mmu);
>
> -       pm_runtime_get_sync(mmu->dev);
>         iommu_unmap(iommu->domain, iova, len);
> -       pm_runtime_put_sync(mmu->dev);
>
>         return 0;
>  }
> --
> 2.17.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the Freedreno mailing list