[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210601224750.513996-1-robdclark@gmail.com>
Date: Tue, 1 Jun 2021 15:47:18 -0700
From: Rob Clark <robdclark@...il.com>
To: dri-devel@...ts.freedesktop.org
Cc: Jordan Crouse <jordan@...micpenguin.net>,
Rob Clark <robdclark@...omium.org>,
Abhinav Kumar <abhinavk@...eaurora.org>,
Akhil P Oommen <akhilpo@...eaurora.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...ainline.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Dave Airlie <airlied@...hat.com>,
Douglas Anderson <dianders@...omium.org>,
Eric Anholt <eric@...olt.net>,
freedreno@...ts.freedesktop.org (open list:DRM DRIVER FOR MSM ADRENO
GPU), iommu@...ts.linux-foundation.org (open list:IOMMU DRIVERS),
Iskren Chernev <iskren.chernev@...il.com>,
Joerg Roedel <jroedel@...e.de>,
Jonathan Marek <jonathan@...ek.ca>,
Kalyan Thota <kalyan_t@...eaurora.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>,
Krishna Reddy <vdumpa@...dia.com>,
"Kristian H. Kristensen" <hoegsberg@...gle.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Lee Jones <lee.jones@...aro.org>,
linux-arm-kernel@...ts.infradead.org (moderated list:ARM SMMU DRIVERS),
linux-arm-msm@...r.kernel.org (open list:DRM DRIVER FOR MSM ADRENO GPU),
linux-kernel@...r.kernel.org (open list),
Marijn Suijten <marijn.suijten@...ainline.org>,
Maxime Ripard <maxime@...no.tech>,
Qinglang Miao <miaoqinglang@...wei.com>,
Robin Murphy <robin.murphy@....com>,
Sai Prakash Ranjan <saiprakash.ranjan@...eaurora.org>,
Sharat Masetty <smasetty@...eaurora.org>,
Stephen Boyd <swboyd@...omium.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Ville Syrjälä
<ville.syrjala@...ux.intel.com>, Will Deacon <will@...nel.org>,
Zhenzhong Duan <zhenzhong.duan@...il.com>
Subject: [PATCH v4 0/6] iommu/arm-smmu: adreno-smmu page fault handling
From: Rob Clark <robdclark@...omium.org>
This picks up an earlier series[1] from Jordan, and adds additional
support needed to generate GPU devcore dumps on iova faults. Original
description:
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.
v4: [Rob] Add support to stall SMMU on fault, and let the GPU driver
resume translation after it has had a chance to snapshot the GPUs
state
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
[1] https://lore.kernel.org/dri-devel/20210225175135.91922-1-jcrouse@codeaurora.org/
Jordan Crouse (3):
iommu/arm-smmu: Add support for driver IOMMU fault handlers
iommu/arm-smmu-qcom: Add an adreno-smmu-priv callback to get pagefault
info
drm/msm: Improve the a6xx page fault handler
Rob Clark (3):
iommu/arm-smmu-qcom: Add stall support
drm/msm: Add crashdump support for stalled SMMU
drm/msm: devcoredump iommu fault support
drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 2 +-
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 | 9 +-
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 101 +++++++++++++++++++-
drivers/gpu/drm/msm/adreno/a6xx_gpu.h | 2 +-
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 43 +++++++--
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 15 +++
drivers/gpu/drm/msm/msm_debugfs.c | 2 +-
drivers/gpu/drm/msm/msm_gem.h | 1 +
drivers/gpu/drm/msm/msm_gem_submit.c | 1 +
drivers/gpu/drm/msm/msm_gpu.c | 55 ++++++++++-
drivers/gpu/drm/msm/msm_gpu.h | 19 +++-
drivers/gpu/drm/msm/msm_gpummu.c | 5 +
drivers/gpu/drm/msm/msm_iommu.c | 22 ++++-
drivers/gpu/drm/msm/msm_mmu.h | 5 +-
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 50 ++++++++++
drivers/iommu/arm/arm-smmu/arm-smmu.c | 9 +-
drivers/iommu/arm/arm-smmu/arm-smmu.h | 2 +
include/linux/adreno-smmu-priv.h | 38 +++++++-
20 files changed, 354 insertions(+), 31 deletions(-)
--
2.31.1
Powered by blists - more mailing lists