Skip to contentSkip to conversation

Fix pde_copy/pde_array initialisation

PATCH In review Christian König 2 participants 2 messages Jan 23, 2018 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix pde_copy/pde_array initialisation

All zero is a perfectly valid value for a PDE.

---
 src/lib/read_vram.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/lib/read_vram.c +2 -2
index 3331b3e..25ffec9 100644
@@ -136,7 +136,7 @@ static int umr_access_vram_vi(struct umr_asic *asic, uint32_t vmid,
 	unsigned char *pdst = dst;
 
 	memset(&registers, 0, sizeof registers);
-	memset(&pde_copy, 0, sizeof pde_copy);
+	memset(&pde_copy, 0xff, sizeof pde_copy);
 
 	/*
 	 * PTE format on VI:
@@ -357,7 +357,7 @@ static int umr_access_vram_ai(struct umr_asic *asic, uint32_t vmid,
 	static const char *indentation = "            \\->";
 
 	memset(&registers, 0, sizeof registers);
-	memset(&pde_array, 0, sizeof pde_array);
+	memset(&pde_array, 0xff, sizeof pde_array);
 
 	/*
 	 * PTE format on AI:
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20180123135545.1787-1-christian.koenig-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Thanks, I RB'ed and pushed it out.

Quoted 22 lines · Christian König

All zero is a perfectly valid value for a PDE.

---
  src/lib/read_vram.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
src/lib/read_vram.c +1 -1
index 3331b3e..25ffec9 100644
@@ -136,7 +136,7 @@ static int umr_access_vram_vi(struct umr_asic *asic, uint32_t vmid,
  	unsigned char *pdst = dst;
 
  	memset(&registers, 0, sizeof registers);
-	memset(&pde_copy, 0, sizeof pde_copy);
+	memset(&pde_copy, 0xff, sizeof pde_copy);
 
  	/*
  	 * PTE format on VI:

src/lib/read_vram.c static int umr_access_vram_ai(struct umr_asic *asic, uint32_t vmid, · line 363

Quoted 8 lines
src/lib/read_vram.c +1 -1
@@ -357,7 +357,7 @@ static int umr_access_vram_ai(struct umr_asic *asic, uint32_t vmid,
  	static const char *indentation = "            \\->";
 
  	memset(&registers, 0, sizeof registers);
-	memset(&pde_array, 0, sizeof pde_array);
+	memset(&pde_array, 0xff, sizeof pde_array);
 
  	/*
  	 * PTE format on AI:

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx