All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH umr] Skip ahead if PDE entry is actually a PTE entry. (v2)
@ 2017-11-04 17:15 Tom St Denis
       [not found] ` <20171104171535.6620-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Tom St Denis @ 2017-11-04 17:15 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Tom St Denis

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>

(v2) Don't print out PDE entries with PTE bit set
---
 src/lib/read_vram.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/lib/read_vram.c b/src/lib/read_vram.c
index 0df48dadec12..51823d71021e 100644
--- a/src/lib/read_vram.c
+++ b/src/lib/read_vram.c
@@ -509,7 +509,7 @@ static int umr_access_vram_ai(struct umr_asic *asic, uint32_t vmid,
 				pde_fields.system        = (pde_entry >> 1) & 1;
 				pde_fields.cache         = (pde_entry >> 2) & 1;
 				pde_fields.pte           = (pde_entry >> 54) & 1;
-				if (memcmp(&pde_fields, &pde_array[pde_cnt], sizeof pde_fields) && asic->options.verbose)
+				if (!pde_fields.pte && memcmp(&pde_fields, &pde_array[pde_cnt], sizeof pde_fields) && asic->options.verbose)
 					fprintf(stderr, "[VERBOSE]: %s PDE%d=0x%016llx, VA=0x%012llx, PBA==0x%012llx, V=%d, S=%d, C=%d, P=%d\n",
 							&indentation[12-pde_cnt*3],
 							pde_cnt,
@@ -522,6 +522,11 @@ static int umr_access_vram_ai(struct umr_asic *asic, uint32_t vmid,
 							(int)pde_fields.pte);
 				memcpy(&pde_array[pde_cnt++], &pde_fields, sizeof pde_fields);
 
+				if (pde_fields.pte) {
+					pte_entry = pde_entry;
+					goto pde_is_pte;
+				}
+
 				if (!pde_fields.system)
 					pde_fields.pte_base_addr -= vm_fb_offset;
 
@@ -539,6 +544,7 @@ static int umr_access_vram_ai(struct umr_asic *asic, uint32_t vmid,
 				return -1;
 
 			// decode PTE values
+pde_is_pte:
 			pte_fields.page_base_addr = pte_entry & 0xFFFFFFFFFF000ULL;
 			pte_fields.fragment       = (pte_entry >> 7)  & 0x1F;
 			pte_fields.system         = (pte_entry >> 1) & 1;
-- 
2.12.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2017-11-06 18:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-04 17:15 [PATCH umr] Skip ahead if PDE entry is actually a PTE entry. (v2) Tom St Denis
     [not found] ` <20171104171535.6620-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-11-06 10:01   ` Christian König
     [not found]     ` <0b642f55-e810-c1a4-f6b5-4644eba2f967-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-06 18:28       ` Tom St Denis
     [not found]         ` <33d2fd4b-6645-e4f4-629a-40f48a339477-5C7GfCeVMHo@public.gmane.org>
2017-11-06 18:34           ` Christian König
     [not found]             ` <a9059d35-db2e-b8e3-7e1b-ea829950dc42-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-11-06 18:39               ` Tom St Denis
     [not found]                 ` <bff0ee92-e57d-ee07-e8a0-1bd54d81a04a-5C7GfCeVMHo@public.gmane.org>
2017-11-06 18:47                   ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.