AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Timur Kristóf" <timur.kristof@gmail.com>
To: "Christian König" <christian.koenig@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	amd-gfx@lists.freedesktop.org
Cc: "Timur Kristóf" <timur.kristof@gmail.com>
Subject: [PATCH 06/10] drm/amdgpu/gmc6: Don't print MC client as it's unknown
Date: Wed, 26 Nov 2025 14:29:48 +0100	[thread overview]
Message-ID: <20251126132952.150452-7-timur.kristof@gmail.com> (raw)
In-Reply-To: <20251126132952.150452-1-timur.kristof@gmail.com>

The VM_CONTEXT1_PROTECTION_FAULT_MCCLIENT register
doesn't exist on GMC v6 so we can't print the MC client as a
string like we do on GMC v7-v8. However, we still print the
mc_id from VM_CONTEXT1_PROTECTION_FAULT_STATUS.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index 499dfd78092d..f6715648b08a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
@@ -610,23 +610,21 @@ static void gmc_v6_0_gart_disable(struct amdgpu_device *adev)
 }
 
 static void gmc_v6_0_vm_decode_fault(struct amdgpu_device *adev,
-				     u32 status, u32 addr, u32 mc_client)
+				     u32 status, u32 addr)
 {
 	u32 mc_id;
 	u32 vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID);
 	u32 protections = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
 					PROTECTIONS);
-	char block[5] = { mc_client >> 24, (mc_client >> 16) & 0xff,
-		(mc_client >> 8) & 0xff, mc_client & 0xff, 0 };
 
 	mc_id = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
 			      MEMORY_CLIENT_ID);
 
-	dev_err(adev->dev, "VM fault (0x%02x, vmid %d) at page %u, %s from '%s' (0x%08x) (%d)\n",
+	dev_err(adev->dev, "VM fault (0x%02x, vmid %d) at page %u, %s from %d\n",
 	       protections, vmid, addr,
 	       REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
 			     MEMORY_CLIENT_RW) ?
-	       "write" : "read", block, mc_client, mc_id);
+	       "write" : "read", mc_id);
 }
 
 static const u32 mc_cg_registers[] = {
@@ -1089,7 +1087,7 @@ static int gmc_v6_0_process_interrupt(struct amdgpu_device *adev,
 			addr);
 		dev_err(adev->dev, "  VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
 			status);
-		gmc_v6_0_vm_decode_fault(adev, status, addr, 0);
+		gmc_v6_0_vm_decode_fault(adev, status, addr);
 	}
 
 	return 0;
-- 
2.51.1


  parent reply	other threads:[~2025-11-26 13:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26 13:29 [PATCH 00/10] drm/amdgpu: Improve page fault handling on GMC v6-8 Timur Kristóf
2025-11-26 13:29 ` [PATCH 01/10] drm/amdgpu/si_ih: Enable soft IRQ handler ring Timur Kristóf
2025-11-26 13:29 ` [PATCH 02/10] drm/amdgpu/cik_ih: " Timur Kristóf
2025-11-26 13:29 ` [PATCH 03/10] drm/amdgpu/iceland_ih: " Timur Kristóf
2025-11-26 13:29 ` [PATCH 04/10] drm/amdgpu/tonga_ih: " Timur Kristóf
2025-11-26 13:29 ` [PATCH 05/10] drm/amdgpu/cz_ih: " Timur Kristóf
2025-11-26 13:29 ` Timur Kristóf [this message]
2025-11-26 13:29 ` [PATCH 07/10] drm/amdgpu/gmc6: Cache VM fault info Timur Kristóf
2025-11-26 13:29 ` [PATCH 08/10] drm/amdgpu/gmc6: Delegate VM faults to soft IRQ handler ring Timur Kristóf
2025-11-26 13:29 ` [PATCH 09/10] drm/amdgpu/gmc7: " Timur Kristóf
2025-11-26 13:29 ` [PATCH 10/10] drm/amdgpu/gmc8: " Timur Kristóf
2025-11-26 14:22 ` [PATCH 00/10] drm/amdgpu: Improve page fault handling on GMC v6-8 Christian König
2025-11-26 14:46   ` Alex Deucher
2025-11-26 15:04     ` Christian König

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=20251126132952.150452-7-timur.kristof@gmail.com \
    --to=timur.kristof@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    /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