<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">How about those two patches?</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Yong</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Zhao, Yong<br>
<b>Sent:</b> Monday, October 22, 2018 2:33:26 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org; brahma_sw_dev<br>
<b>Cc:</b> Zhao, Yong<br>
<b>Subject:</b> [PATCH 2/2] drm/amdkfd: page_table_base already have the flags needed</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">The flags are added when calling amdgpu_gmc_pd_addr().<br>
<br>
Change-Id: Idd85b1ac35d3d100154df8229ea20721d9a7045c<br>
Signed-off-by: Yong Zhao <Yong.Zhao@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 5 ++---<br>
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h             | 1 +<br>
 2 files changed, 3 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c<br>
index 54c3690..60b5f56c 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c<br>
@@ -978,7 +978,6 @@ static void set_vm_context_page_table_base(struct kgd_dev *kgd, uint32_t vmid,<br>
                 uint64_t page_table_base)<br>
 {<br>
         struct amdgpu_device *adev = get_amdgpu_device(kgd);<br>
-       uint64_t base = page_table_base | AMDGPU_PTE_VALID;<br>
 <br>
         if (!amdgpu_amdkfd_is_kfd_vmid(adev, vmid)) {<br>
                 pr_err("trying to set page table base for wrong VMID %u\n",<br>
@@ -990,7 +989,7 @@ static void set_vm_context_page_table_base(struct kgd_dev *kgd, uint32_t vmid,<br>
          * now, all processes share the same address space size, like<br>
          * on GFX8 and older.<br>
          */<br>
-       mmhub_v1_0_setup_vm_pt_regs(adev, vmid, base);<br>
+       mmhub_v1_0_setup_vm_pt_regs(adev, vmid, page_table_base);<br>
 <br>
-       gfxhub_v1_0_setup_vm_pt_regs(adev, vmid, base);<br>
+       gfxhub_v1_0_setup_vm_pt_regs(adev, vmid, page_table_base);<br>
 }<br>
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h<br>
index 53ff86d..dec8e64 100644<br>
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h<br>
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h<br>
@@ -507,6 +507,7 @@ struct qcm_process_device {<br>
          * All the memory management data should be here too<br>
          */<br>
         uint64_t gds_context_area;<br>
+       /* Contains page table flags such as AMDGPU_PTE_VALID since gfx9 */<br>
         uint64_t page_table_base;<br>
         uint32_t sh_mem_config;<br>
         uint32_t sh_mem_bases;<br>
-- <br>
2.7.4<br>
<br>
</div>
</span></font></div>
</body>
</html>