[PATCH umr] Skip ahead if PDE entry is actually a PTE entry.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
---
 src/lib/read_vram.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/read_vram.c b/src/lib/read_vram.c
index 0df48dadec12..5d9523476e25 100644
--- a/src/lib/read_vram.c
+++ b/src/lib/read_vram.c
@@ -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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux