On 03/27/2017 01:53 PM, Chunming Zhou wrote:
Change-Id: I17b40aec68404e46961a9fda22dfadd1ae9d6f2c
Signed-off-by: Chunming Zhou <[email protected]>
---
  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++++++
  1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 6625a2f..613c8f6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -508,6 +508,12 @@ static int gmc_v9_0_vm_init(struct amdgpu_device *adev)
         * amdkfd will use VMIDs 8-15
         */
        adev->vm_manager.num_ids = AMDGPU_NUM_OF_VMIDS;
+       /* Because of four level VMPTs, vm size at least is 256GB.
+       256TB is OK as well */

If each PT size is 9, and contains 3 levels PT + 1 PD.
9 * 3 + 12(page size) + 1(at least 1 bit for PD) = 40 bits here.

Then it looks 1T is minimum size.
Please confirm it.

Jerry.

+       if (amdgpu_vm_size < 256) {
+               DRM_WARN("vm size at least is 256GB!\n");
+               amdgpu_vm_size = 256;
+       }
        adev->vm_manager.num_level = 1;
        amdgpu_vm_manager_init(adev);


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

Reply via email to