[PATCH 2/2] drm/amdgpu: set vm size as 256TB for Vega10

Christian König christian.koenig at amd.com
Wed Mar 29 14:27:51 UTC 2017


Am 29.03.2017 um 16:17 schrieb Alex Deucher:
> On Wed, Mar 29, 2017 at 4:47 AM, Christian König
> <christian.koenig at amd.com> wrote:
>> Am 29.03.2017 um 10:08 schrieb Junwei Zhang:
>>> Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>
>>> ---
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++++
>>>    1 file changed, 5 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>>> index 1ad1113..4af4ea0 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>>> @@ -1080,6 +1080,11 @@ static void amdgpu_get_block_size(struct
>>> amdgpu_device *adev)
>>>      static void amdgpu_check_vm_size(struct amdgpu_device *adev)
>>>    {
>>> +       if (adev->asic_type >= CHIP_VEGA10) {
>>> +               amdgpu_vm_size = 1U << 18; /* 256TB */
>>> +               return;
>>> +       }
>>> +
>>
>> NAK, that would break in a mixed environment with APU+Vega10.
>>
>> Instead just go into gmc_v9_0_sw_init() and set max_pfn = 1ULL << 36 and add
>> a comment there why we hardcode this value for Vega10 and later.
>>
> We should fix this for real and move these variables into the driver
> vm structure and then set those based on the global parameter
> variables in the various gmc modules.

Yeah, that's exactly what I've suggested as well.

max_pfn is already part of the vm manager structure, so setting this 
different on Vega10 than on previous generations shouldn't be a problem.

We just need to add the block size there as well and should be done with it.

Christian.

>
> Alex
>
>> Christian.
>>
>>>          if (!amdgpu_check_pot_argument(amdgpu_vm_size)) {
>>>                  dev_warn(adev->dev, "VM size (%d) must be a power of 2\n",
>>>                           amdgpu_vm_size);
>>
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx




More information about the amd-gfx mailing list