From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: "Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
"Alex Deucher"
<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: amd-gfx list <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 2/2] drm/amdgpu: set vm size as 256TB for Vega10
Date: Fri, 31 Mar 2017 10:53:26 +0800 [thread overview]
Message-ID: <58DDC4A6.9000006@amd.com> (raw)
In-Reply-To: <117a4bc8-debb-76b4-dc2f-6eb4cd247049-5C7GfCeVMHo@public.gmane.org>
On 03/29/2017 10:27 PM, Christian König wrote:
> Am 29.03.2017 um 16:17 schrieb Alex Deucher:
>> On Wed, Mar 29, 2017 at 4:47 AM, Christian König
>> <christian.koenig@amd.com> wrote:
>>> Am 29.03.2017 um 10:08 schrieb Junwei Zhang:
>>>> Signed-off-by: Junwei Zhang <Jerry.Zhang@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.
Thanks for all the comments above.
Prepared another patch to fix it.
Jerry.
>
> 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@lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-03-31 2:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 8:08 [PATCH 1/2] drm/amdgpu: create a func to check vm size Junwei Zhang
[not found] ` <1490774912-583-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2017-03-29 8:08 ` [PATCH 2/2] drm/amdgpu: set vm size as 256TB for Vega10 Junwei Zhang
[not found] ` <1490774912-583-2-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2017-03-29 8:47 ` Christian König
[not found] ` <0b86e484-9d24-039d-ec26-ed973b0a7f14-5C7GfCeVMHo@public.gmane.org>
2017-03-29 14:17 ` Alex Deucher
[not found] ` <CADnq5_N+w++4ckC4pJkFBh5ouAH+zvwVwuP=XxDUuF=dsLEuLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-29 14:27 ` Christian König
[not found] ` <117a4bc8-debb-76b4-dc2f-6eb4cd247049-5C7GfCeVMHo@public.gmane.org>
2017-03-31 2:53 ` Zhang, Jerry (Junwei) [this message]
2017-03-29 8:17 ` [PATCH 1/2] drm/amdgpu: create a func to check vm size zhoucm1
2017-03-29 8:44 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=58DDC4A6.9000006@amd.com \
--to=jerry.zhang-5c7gfcevmho@public.gmane.org \
--cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox