mbox series

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

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

Message

Dmitry Baryshkov Nov. 2, 2022, 5:54 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 v3:
- Restored the condition to enable the quirk in a6xx code.

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    | 33 +++---------------------
 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, 69 insertions(+), 80 deletions(-)