From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
Rob Clark <robdclark@chromium.org>,
Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Jordan Crouse <jordan@cosmicpenguin.net>,
Akhil P Oommen <akhilpo@codeaurora.org>,
Jonathan Marek <jonathan@marek.ca>,
Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>,
Sharat Masetty <smasetty@codeaurora.org>,
Douglas Anderson <dianders@chromium.org>,
Dave Airlie <airlied@redhat.com>,
Stephen Boyd <swboyd@chromium.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 2/3] drm/msm: Show all smmu info for iova fault devcore dumps
Date: Wed, 22 Sep 2021 15:30:22 -0700 [thread overview]
Message-ID: <20210922223029.495772-3-robdclark@gmail.com> (raw)
In-Reply-To: <20210922223029.495772-1-robdclark@gmail.com>
From: Rob Clark <robdclark@chromium.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
---
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +-
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 25 +++++++++++++++++--------
drivers/gpu/drm/msm/msm_gpu.h | 2 +-
3 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
index 4ac652c35c43..f6a4dbef796b 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c
@@ -1269,7 +1269,7 @@ static int a6xx_fault_handler(void *arg, unsigned long iova, int flags, void *da
/* Turn off the hangcheck timer to keep it from bothering us */
del_timer(&gpu->hangcheck_timer);
- gpu->fault_info.ttbr0 = info->ttbr0;
+ gpu->fault_info.smmu_info = *info;
gpu->fault_info.iova = iova;
gpu->fault_info.flags = flags;
gpu->fault_info.type = type;
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 748665232d29..42e522a60623 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -685,19 +685,28 @@ void adreno_show(struct msm_gpu *gpu, struct msm_gpu_state *state,
adreno_gpu->rev.major, adreno_gpu->rev.minor,
adreno_gpu->rev.patchid);
/*
- * If this is state collected due to iova fault, so fault related info
+ * If this is state collected due to iova fault, show fault related
+ * info
*
- * TTBR0 would not be zero, so this is a good way to distinguish
+ * TTBR0 would not be zero in this case, so this is a good way to
+ * distinguish
*/
- if (state->fault_info.ttbr0) {
+ if (state->fault_info.smmu_info.ttbr0) {
const struct msm_gpu_fault_info *info = &state->fault_info;
+ const struct adreno_smmu_fault_info *smmu_info = &info->smmu_info;
drm_puts(p, "fault-info:\n");
- drm_printf(p, " - ttbr0=%.16llx\n", info->ttbr0);
- drm_printf(p, " - iova=%.16lx\n", info->iova);
- drm_printf(p, " - dir=%s\n", info->flags & IOMMU_FAULT_WRITE ? "WRITE" : "READ");
- drm_printf(p, " - type=%s\n", info->type);
- drm_printf(p, " - source=%s\n", info->block);
+ drm_printf(p, " - far: %.16llx\n", smmu_info->far);
+ drm_printf(p, " - ttbr0: %.16llx\n", smmu_info->ttbr0);
+ drm_printf(p, " - contextidr: %.8x\n", smmu_info->contextidr);
+ drm_printf(p, " - fsr: %.8x\n", smmu_info->fsr);
+ drm_printf(p, " - fsynr0: %.8x\n", smmu_info->fsynr0);
+ drm_printf(p, " - fsynr1: %.8x\n", smmu_info->fsynr1);
+ drm_printf(p, " - cbfrsynra: %.8x\n", smmu_info->cbfrsynra);
+ drm_printf(p, " - iova: %.16lx\n", info->iova);
+ drm_printf(p, " - dir: %s\n", info->flags & IOMMU_FAULT_WRITE ? "WRITE" : "READ");
+ drm_printf(p, " - type: %s\n", info->type);
+ drm_printf(p, " - source: %s\n", info->block);
}
drm_printf(p, "rbbm-status: 0x%08x\n", state->rbbm_status);
diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h
index e031c9b495ed..a7a5a53536a8 100644
--- a/drivers/gpu/drm/msm/msm_gpu.h
+++ b/drivers/gpu/drm/msm/msm_gpu.h
@@ -73,7 +73,7 @@ struct msm_gpu_funcs {
/* Additional state for iommu faults: */
struct msm_gpu_fault_info {
- u64 ttbr0;
+ struct adreno_smmu_fault_info smmu_info;
unsigned long iova;
int flags;
const char *type;
--
2.31.1
next prev parent reply other threads:[~2021-09-22 22:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 22:30 [PATCH 0/3] io-pgtable-arm + drm/msm: Extend iova fault debugging Rob Clark
2021-09-22 22:30 ` [PATCH 1/3] iommu/io-pgtable-arm: Add way to debug pgtable walk Rob Clark
2021-09-22 22:30 ` Rob Clark [this message]
2021-09-22 22:30 ` [PATCH 3/3] drm/msm: Extend gpu devcore dumps with pgtbl info Rob Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210922223029.495772-3-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=akhilpo@codeaurora.org \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jonathan@marek.ca \
--cc=jordan@cosmicpenguin.net \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@chromium.org \
--cc=saiprakash.ranjan@codeaurora.org \
--cc=sean@poorly.run \
--cc=smasetty@codeaurora.org \
--cc=swboyd@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).