mbox series

[v3,0/2] drm/msm: rework msm_iommu_new() and .create_address_space cb

Message ID 20221025200357.3637161-1-dmitry.baryshkov@linaro.org
Headers show
Series drm/msm: rework msm_iommu_new() and .create_address_space cb | expand

Message

Dmitry Baryshkov Oct. 25, 2022, 8:03 p.m. UTC
Simplify the MSM IOMMU code a bit. This moves iommu_domain_alloc() and
iommu_set_pgtable_quirks() calls to msm_iommu_new() to get rid of the
disbalance, when the iommu domain is allocated by the caller of
msm_iommu_new() and then it is freed by the msm_iommu code itself.

Changes since v2:
- Reorder the patches.
- Move iommu_set_pgtable_quirks() to the msm_iommu_new() too. It will
  not work if it's called after attaching the device.

Changes since v1:
- Fixed the uninitialized variable usage in a6xx_gmu_memory_probe()
  (reported by lkp)

Dmitry Baryshkov (2):
  drm/msm: move domain allocation into msm_iommu_new()
  drm/msm: remove duplicated code from a6xx_create_address_space

 drivers/gpu/drm/msm/adreno/a3xx_gpu.c    |  2 +-
 drivers/gpu/drm/msm/adreno/a4xx_gpu.c    |  2 +-
 drivers/gpu/drm/msm/adreno/a5xx_gpu.c    |  2 +-
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c    | 12 ++++----
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c    | 36 +-----------------------
 drivers/gpu/drm/msm/adreno/adreno_gpu.c  | 29 ++++++++++---------
 drivers/gpu/drm/msm/adreno/adreno_gpu.h  |  9 ++++--
 drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 19 +++++++------
 drivers/gpu/drm/msm/msm_drv.c            | 18 ++++++------
 drivers/gpu/drm/msm/msm_iommu.c          | 20 +++++++++++--
 drivers/gpu/drm/msm/msm_mmu.h            |  3 +-
 11 files changed, 67 insertions(+), 85 deletions(-)