[PATCH 13/15] drm/amdgpu: adapt vm size for multi vmpt
zhoucm1
david1.zhou at amd.com
Tue Mar 28 03:43:46 UTC 2017
On 2017年03月28日 11:19, Zhang, Jerry (Junwei) wrote:
> On 03/27/2017 01:53 PM, Chunming Zhou wrote:
>> Change-Id: I17b40aec68404e46961a9fda22dfadd1ae9d6f2c
>> Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
>> ---
>> 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.
block size is 9 means 512 entries each PDB/PTB. then one PDE of 4 levels
is 512* 512 *512*4KB = 512GB.
will send another patch to correct this typo.
Thanks,
David Zhou
>
> 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);
>>
>>
More information about the amd-gfx
mailing list