From: zhoucm1 <david1.zhou-5C7GfCeVMHo@public.gmane.org>
To: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>
Cc: "Alex Deucher" <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
"Ken Wang" <Qingqing.Wang-5C7GfCeVMHo@public.gmane.org>,
"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
"Alvin Huan" <Alvin.Huan-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH 01/18] drm/amdgpu: abstract gart table initialization for gfxhub/mmhub
Date: Thu, 1 Jun 2017 13:30:31 +0800 [thread overview]
Message-ID: <592FA677.2020102@amd.com> (raw)
In-Reply-To: <20170601052900.GA7766@hr-amur2>
On 2017年06月01日 13:29, Huang Rui wrote:
> On Thu, Jun 01, 2017 at 12:19:19PM +0800, zhoucm1 wrote:
>>
>> On 2017年06月01日 00:14, Huang Rui wrote:
>>> Signed-off-by: Huang Rui <ray.huang@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 33 +++++++++++++++++++-------------
>>> drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 33 +++++++++++++++++++-------------
>>> 2 files changed, 40 insertions(+), 26 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
>>> index 7c430c4..8cf30b7 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
>>> @@ -31,6 +31,24 @@
>>> #include "soc15_common.h"
>>> +static void gfxhub_v1_0_init_pt_regs(struct amdgpu_device *adev)
>>> +{
>>> + uint64_t value;
>>> +
>>> + BUG_ON(adev->gart.table_addr & (~0x0000FFFFFFFFF000ULL));
>>> + value = adev->gart.table_addr - adev->mc.vram_start
>>> + + adev->vm_manager.vram_base_offset;
>>> + value &= 0x0000FFFFFFFFF000ULL;
>>> + value |= 0x1; /*valid bit*/
>>> +
>>> + WREG32(SOC15_REG_OFFSET(GC, 0,
>>> + mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32),
>>> + (u32)value);
>>> + WREG32(SOC15_REG_OFFSET(GC, 0,
>>> + mmVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32),
>>> + (u32)(value >> 32));
>>> +}
>>> +
>>> int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev)
>>> {
>>> u32 tmp;
>>> @@ -38,6 +56,8 @@ int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev)
>>> u32 i;
>>> /* Program MC. */
>>> + gfxhub_v1_0_init_pt_regs(adev);
>>> +
>> abstraction is fine, but why you change code location?
>>
> Because we would better to align the programming sequence with windows
> part.
If you make sure it aligns with windows, then that's good. Otherwise we
should keep same with previous.
Regards,
David Zhou
> That's helpful to debug in future.
>
> Thanks,
> Ray
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-06-01 5:30 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-31 16:14 [PATCH 00/18] Vega10 S3 following up Huang Rui
[not found] ` <1496247293-16429-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2017-05-31 16:14 ` [PATCH 01/18] drm/amdgpu: abstract gart table initialization for gfxhub/mmhub Huang Rui
[not found] ` <1496247293-16429-2-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2017-05-31 16:32 ` Deucher, Alexander
2017-05-31 17:02 ` Christian König
[not found] ` <1bda3f76-870e-02a0-b51e-f37f02e4ef52-5C7GfCeVMHo@public.gmane.org>
2017-06-01 1:59 ` Huang Rui
2017-06-01 4:19 ` zhoucm1
[not found] ` <592F95C7.4080406-5C7GfCeVMHo@public.gmane.org>
2017-06-01 5:29 ` Huang Rui
2017-06-01 5:30 ` zhoucm1 [this message]
2017-05-31 16:14 ` [PATCH 02/18] drm/amdgpu: abstract gart aperture " Huang Rui
[not found] ` <1496247293-16429-3-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2017-05-31 16:38 ` Deucher, Alexander
2017-05-31 16:14 ` [PATCH 03/18] drm/amdgpu: abstract system " Huang Rui
2017-05-31 16:14 ` [PATCH 04/18] drm/amdgpu: abstract TLB " Huang Rui
2017-05-31 16:14 ` [PATCH 05/18] drm/amdgpu: abstract cache " Huang Rui
2017-05-31 16:14 ` [PATCH 06/18] drm/amdgpu: abstract system domain enablement " Huang Rui
2017-05-31 16:14 ` [PATCH 07/18] drm/amdgpu: abstract disable identity aperture " Huang Rui
[not found] ` <1496247293-16429-8-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2017-05-31 16:21 ` Deucher, Alexander
2017-05-31 16:14 ` [PATCH 08/18] drm/amdgpu: abstract setup vmid config " Huang Rui
2017-05-31 16:14 ` [PATCH 09/18] drm/amdgpu: fix to miss program invalidation at resume Huang Rui
2017-05-31 16:14 ` [PATCH 10/18] drm/amdgpu: export gfxhub sw_init into gmc Huang Rui
2017-05-31 16:14 ` [PATCH 11/18] drm/amdgpu: export mmhub " Huang Rui
[not found] ` <1496247293-16429-12-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2017-05-31 17:04 ` Christian König
[not found] ` <fd87586c-8609-bd81-b7e3-46f2a72a90e2-5C7GfCeVMHo@public.gmane.org>
2017-06-01 1:42 ` Huang Rui
2017-05-31 16:14 ` [PATCH 12/18] drm/amdgpu: export mmhub set clockgating " Huang Rui
2017-05-31 16:14 ` [PATCH 13/18] drm/amdgpu: export mmhub get " Huang Rui
2017-05-31 16:14 ` [PATCH 14/18] drm/amdgpu: remove gfxhub ip Huang Rui
2017-05-31 16:14 ` [PATCH 15/18] drm/amdgpu: remove mmhub ip Huang Rui
2017-05-31 16:14 ` [PATCH 16/18] drm/amdgpu: add ip name print for selecting ips with ip_block_mask Huang Rui
2017-05-31 16:14 ` [PATCH 17/18] drm/amdgpu: add ip block number prints Huang Rui
2017-05-31 16:14 ` [PATCH 18/18] drm/amdgpu: fix the gart table cleared issue for S3 Huang Rui
[not found] ` <1496247293-16429-19-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2017-05-31 16:29 ` Deucher, Alexander
[not found] ` <BN6PR12MB16529494252B5889988E00BBF7F10-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-05-31 16:58 ` Christian König
[not found] ` <e2d9fdd5-7544-8b2c-031d-3894e2a7ec07-5C7GfCeVMHo@public.gmane.org>
2017-06-01 1:49 ` Huang Rui
2017-05-31 16:43 ` [PATCH 00/18] Vega10 S3 following up Deucher, Alexander
2017-05-31 17:00 ` Zhang, Hawking
[not found] ` <CY1PR12MB053461B71BE32E7234ECF668FCF10-1s8aH8ViOEf7axfsnaG19wdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-06-01 2:01 ` Huang Rui
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=592FA677.2020102@amd.com \
--to=david1.zhou-5c7gfcevmho@public.gmane.org \
--cc=Alvin.Huan-5C7GfCeVMHo@public.gmane.org \
--cc=Qingqing.Wang-5C7GfCeVMHo@public.gmane.org \
--cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
--cc=ray.huang-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