dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 1/6] drm/nouveau: fault: Store aperture in fault information
Date: Mon, 16 Sep 2019 17:17:52 +0200	[thread overview]
Message-ID: <20190916151757.10953-2-thierry.reding@gmail.com> (raw)
In-Reply-To: <20190916151757.10953-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

From: Thierry Reding <treding@nvidia.com>

The fault information register contains data about the aperture that
caused the failure. This can be useful in debugging aperture related
programming bugs.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/nouveau/include/nvkm/subdev/fault.h | 1 +
 drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c    | 3 ++-
 drivers/gpu/drm/nouveau/nvkm/subdev/fault/gv100.c   | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fault.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fault.h
index 97322f95b3ee..1cc862bc1122 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fault.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fault.h
@@ -21,6 +21,7 @@ struct nvkm_fault_data {
 	u64  addr;
 	u64  inst;
 	u64  time;
+	u8 aperture;
 	u8 engine;
 	u8  valid;
 	u8    gpc;
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
index 5d4b695cab8e..81cbe1cc4804 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
@@ -519,9 +519,10 @@ gk104_fifo_fault(struct nvkm_fifo *base, struct nvkm_fault_data *info)
 	chan = nvkm_fifo_chan_inst_locked(&fifo->base, info->inst);
 
 	nvkm_error(subdev,
-		   "fault %02x [%s] at %016llx engine %02x [%s] client %02x "
+		   "fault %02x [%s] at %016llx aperture %02x engine %02x [%s] client %02x "
 		   "[%s%s] reason %02x [%s] on channel %d [%010llx %s]\n",
 		   info->access, ea ? ea->name : "", info->addr,
+		   info->aperture,
 		   info->engine, ee ? ee->name : en,
 		   info->client, ct, ec ? ec->name : "",
 		   info->reason, er ? er->name : "", chan ? chan->chid : -1,
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fault/gv100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fault/gv100.c
index 6747f09c2dc3..b5e32295237b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/fault/gv100.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fault/gv100.c
@@ -138,6 +138,7 @@ gv100_fault_intr_fault(struct nvkm_fault *fault)
 	info.inst = ((u64)insthi << 32) | (info0 & 0xfffff000);
 	info.time = 0;
 	info.engine = (info0 & 0x000000ff);
+	info.aperture = (info0 & 0x00000c00) >> 10;
 	info.valid  = (info1 & 0x80000000) >> 31;
 	info.gpc    = (info1 & 0x1f000000) >> 24;
 	info.hub    = (info1 & 0x00100000) >> 20;
-- 
2.23.0

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2019-09-16 15:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-16 15:17 [PATCH 0/6] drm/nouveau: Preparatory work for GV11B support Thierry Reding
     [not found] ` <20190916151757.10953-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-09-16 15:17   ` Thierry Reding [this message]
     [not found]     ` <20190916151757.10953-2-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-09-17  3:47       ` [PATCH 1/6] drm/nouveau: fault: Store aperture in fault information Ben Skeggs
     [not found]         ` <CACAvsv70b1-LJoaP1ZL2hvy9xMcO1WXqh0ibGzNfpB81ybgrTg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-09-17  9:05           ` Thierry Reding
2019-09-16 15:17   ` [PATCH 2/6] drm/nouveau: fault: Widen engine field Thierry Reding
     [not found]     ` <20190916151757.10953-3-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-09-17  3:48       ` Ben Skeggs
2019-09-17  9:05         ` [Nouveau] " Thierry Reding
2019-09-16 15:17   ` [PATCH 3/6] drm/nouveau: Remove bogus gk20a aperture callback Thierry Reding
2019-09-17  3:43     ` [Nouveau] " Ben Skeggs
     [not found]       ` <CACAvsv6AzWvpPLaOKahpJErTAMCJet4_4mBvRC8Z+e4+bwaD4w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-09-17  9:02         ` Thierry Reding
2019-09-20 15:55           ` [Nouveau] " Thierry Reding
2019-09-16 15:17   ` [PATCH 4/6] drm/nouveau: Implement nvkm_memory_aperture() Thierry Reding
2019-09-16 15:17   ` [PATCH 5/6] drm/nouveau: Remove unused nvkm_vmm_func->aper() implementations Thierry Reding
2019-09-16 15:17 ` [PATCH 6/6] drm/nouveau: Program aperture field where necessary Thierry Reding

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=20190916151757.10953-2-thierry.reding@gmail.com \
    --to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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