dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/radeon/cik: Fix printing of client name on VM protection fault
@ 2013-09-18 13:39 Michel Dänzer
  2013-09-18 13:39 ` [PATCH 2/3] drm/radeon/cik: Fix encoding of number of banks in tiling configuration info Michel Dänzer
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Michel Dänzer @ 2013-09-18 13:39 UTC (permalink / raw)
  To: dri-devel

From: Michel Dänzer <michel.daenzer@amd.com>

The string is encoded from the MSB to the LSB of the register.

Cc: stable@vger.kernel.org
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 drivers/gpu/drm/radeon/cik.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index a77b593..4f1f419 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -4721,12 +4721,13 @@ static void cik_vm_decode_fault(struct radeon_device *rdev,
 	u32 mc_id = (status & MEMORY_CLIENT_ID_MASK) >> MEMORY_CLIENT_ID_SHIFT;
 	u32 vmid = (status & FAULT_VMID_MASK) >> FAULT_VMID_SHIFT;
 	u32 protections = (status & PROTECTIONS_MASK) >> PROTECTIONS_SHIFT;
-	char *block = (char *)&mc_client;
+	char block[5] = { mc_client >> 24, (mc_client >> 16) & 0xff,
+		(mc_client >> 8) & 0xff, mc_client & 0xff, 0 };
 
-	printk("VM fault (0x%02x, vmid %d) at page %u, %s from %s (%d)\n",
+	printk("VM fault (0x%02x, vmid %d) at page %u, %s from '%s' (0x%08x) (%d)\n",
 	       protections, vmid, addr,
 	       (status & MEMORY_CLIENT_RW_MASK) ? "write" : "read",
-	       block, mc_id);
+	       block, mc_client, mc_id);
 }
 
 /**
-- 
1.8.4.rc3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-09-18 16:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 13:39 [PATCH 1/3] drm/radeon/cik: Fix printing of client name on VM protection fault Michel Dänzer
2013-09-18 13:39 ` [PATCH 2/3] drm/radeon/cik: Fix encoding of number of banks in tiling configuration info Michel Dänzer
2013-09-18 13:39 ` [PATCH 3/3] drm/radeon/cik: Program pipe configuration for 1D tiling modes as well Michel Dänzer
2013-09-18 13:56   ` Alex Deucher
2013-09-18 15:55     ` Michel Dänzer
2013-09-18 16:00       ` Alex Deucher
2013-09-18 15:44 ` [PATCH 1/3] drm/radeon/cik: Fix printing of client name on VM protection fault Alex Deucher

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).