Skip to content

iommu/arm-smmu: adreno-smmu page fault handling

Jordan Crouse dri-devel linux-arm-kernel linux-arm-msm linux-iommu lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 3 repliesIn review
  2. v23 patches 6 repliesSuperseded
  3. v1 RFC3 patches 2 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3iommu/arm-smmu: Add support for driver IOMMU fault handlersdrivers/iommu/arm/arm-smmu/arm-smmu.c+7 -23 replies
2/3drm/msm: Add an adreno-smmu-priv callback to get pagefault infodrivers/iommu/arm/arm-smmu/arm-smmu-qcom.c drivers/iommu/arm/arm-smmu/arm-smmu.h include/linux/adreno-smmu-priv.h+51 -10 replies
3/3drm/msm: Improve the a6xx page fault handlerdrivers/gpu/drm/msm/adreno/a5xx_gpu.c drivers/gpu/drm/msm/adreno/a6xx_gpu.c drivers/gpu/drm/msm/msm_iommu.c +1 more+87 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/3] iommu/arm-smmu: adreno-smmu page fault handling

(resending for the 5.13 cycle)

This is a stack to add an Adreno GPU specific handler for pagefaults. The first patch starts by wiring up report_iommu_fault for arm-smmu. The next patch adds a adreno-smmu-priv function hook to capture a handful of important debugging registers such as TTBR0, CONTEXTIDR, FSYNR0 and others. This is used by the third patch to print more detailed information on page fault such as the TTBR0 for the pagetable that caused the fault and the source of the fault as determined by a combination of the FSYNR1 register and an internal GPU register.

This code provides a solid base that we can expand on later for even more extensive GPU side page fault debugging capabilities.

v3: Always clear FSR even if the target driver is going to handle resume
v2: Fix comment wording and function pointer check per Rob Clark

Jordan Crouse (3):
iommu/arm-smmu: Add support for driver IOMMU fault handlers drm/msm: Add an adreno-smmu-priv callback to get pagefault info drm/msm: Improve the a6xx page fault handler

 drivers/gpu/drm/msm/adreno/a5xx_gpu.c      |  4 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c      | 76 +++++++++++++++++++++-
 drivers/gpu/drm/msm/msm_iommu.c            | 11 +++-
 drivers/gpu/drm/msm/msm_mmu.h              |  4 +-
 drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 19 ++++++
 drivers/iommu/arm/arm-smmu/arm-smmu.c      |  9 ++-
 drivers/iommu/arm/arm-smmu/arm-smmu.h      |  2 +
 include/linux/adreno-smmu-priv.h           | 31 ++++++++-
 8 files changed, 145 insertions(+), 11 deletions(-)
Signature · 6 lines
2.25.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel