AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>
To: Chunming Zhou <zhoucm1-5C7GfCeVMHo@public.gmane.org>,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 14/21] drm/amdgpu: add new amdgpu_gmc_emit_flush_gpu_tlb callback
Date: Thu, 18 Jan 2018 09:15:13 +0100	[thread overview]
Message-ID: <a0aa6214-44c9-12e9-d40b-13a36b4e2788@amd.com> (raw)
In-Reply-To: <db8d7b0d-bb67-e5fe-299e-a334e483bd19-5C7GfCeVMHo@public.gmane.org>

Am 18.01.2018 um 08:08 schrieb Chunming Zhou:
>
>
> On 2018年01月17日 20:19, Christian König wrote:
>> Am 17.01.2018 um 07:24 schrieb Chunming Zhou:
>>> I'm not sure if this is a good ongoing, as I know, our per IP 
>>> topology is intended for every generation asic bringup.
>>
>> Actually the intention goes beyond that, e.g. we want to reuse IPs 
>> for newer ASICs as well when they haven't changed.
>>
>>>
>>> I think there are many similar logics which we can abstract, but we 
>>> don't do that.
>>>
>>> For emit_wreg above patches, they only can be used by vm flush part, 
>>> but they are common func fallback.
>>>
>>> Can we only make emit_wreg as static in their files, and replace 
>>> every where they are used?
>>
>> Not sure what you are suggesting here?
> my mean is like the attached, only abstract them in file per ip.

That is not a good idea. The functions should be independent from the 
hardware version.

Additional to that we want to avoid using structures for ring buffer 
content.

Regards,
Christian.

>
>
> Regards,
> David Zhou
>>
>> Regards,
>> Christian.
>>
>>>
>>> Regards,
>>> David Zhou
>>> On 2018年01月17日 03:40, Christian König wrote:
>>>> Add a new GMC function to unify vm flushing.
>>>>
>>>> Signed-off-by: Christian König <christian.koenig@amd.com>
>>>> ---
>>>>   drivers/gpu/drm/amd/amdgpu/amdgpu.h     | 1 +
>>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 3 +++
>>>>   2 files changed, 4 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h 
>>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>>>> index 93eae393b08d..230826718c98 100644
>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>>>> @@ -1779,6 +1779,7 @@ amdgpu_get_sdma_instance(struct amdgpu_ring 
>>>> *ring)
>>>>   #define amdgpu_asic_flush_hdp(adev) 
>>>> (adev)->asic_funcs->flush_hdp((adev))
>>>>   #define amdgpu_asic_invalidate_hdp(adev) 
>>>> (adev)->asic_funcs->invalidate_hdp((adev))
>>>>   #define amdgpu_gmc_flush_gpu_tlb(adev, vmid) 
>>>> (adev)->gmc.gmc_funcs->flush_gpu_tlb((adev), (vmid))
>>>> +#define amdgpu_gmc_emit_flush_gpu_tlb(r, vmid, pasid, addr) 
>>>> (r)->adev->gmc.gmc_funcs->emit_flush_gpu_tlb((r), (vmid), (pasid), 
>>>> (addr))
>>>>   #define amdgpu_gmc_set_pte_pde(adev, pt, idx, addr, flags) 
>>>> (adev)->gmc.gmc_funcs->set_pte_pde((adev), (pt), (idx), (addr), 
>>>> (flags))
>>>>   #define amdgpu_gmc_get_vm_pde(adev, level, dst, flags) 
>>>> (adev)->gmc.gmc_funcs->get_vm_pde((adev), (level), (dst), (flags))
>>>>   #define amdgpu_gmc_get_pte_flags(adev, flags) 
>>>> (adev)->gmc.gmc_funcs->get_vm_pte_flags((adev),(flags))
>>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h 
>>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
>>>> index a4a8374f7f3f..114350a4693f 100644
>>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
>>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h
>>>> @@ -52,6 +52,9 @@ struct amdgpu_gmc_funcs {
>>>>       /* flush the vm tlb via mmio */
>>>>       void (*flush_gpu_tlb)(struct amdgpu_device *adev,
>>>>                     uint32_t vmid);
>>>> +    /* flush the vm tlb via ring */
>>>> +    uint64_t (*emit_flush_gpu_tlb)(struct amdgpu_ring *ring, 
>>>> unsigned vmid,
>>>> +                       unsigned pasid, uint64_t pd_addr);
>>>>       /* write pte/pde updates using the cpu */
>>>>       int (*set_pte_pde)(struct amdgpu_device *adev,
>>>>                  void *cpu_pt_addr, /* cpu addr of page table */
>>>
>>
>

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-01-18  8:15 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-16 19:39 [PATCH 01/21] drm/amdgpu: wire up emit_wreg for gfx v6 Christian König
     [not found] ` <20180116194017.39067-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-16 19:39   ` [PATCH 02/21] drm/amdgpu: wire up emit_wreg for gfx v7 Christian König
2018-01-16 19:39   ` [PATCH 03/21] drm/amdgpu: wire up emit_wreg for gfx v8 Christian König
2018-01-16 19:40   ` [PATCH 04/21] drm/amdgpu: wire up emit_wreg for gfx v9 Christian König
2018-01-16 19:40   ` [PATCH 05/21] drm/amdgpu: wire up emit_wreg for SI DMA Christian König
2018-01-16 19:40   ` [PATCH 06/21] drm/amdgpu: wire up emit_wreg for CIK SDMA Christian König
2018-01-16 19:40   ` [PATCH 07/21] drm/amdgpu: wire up emit_wreg for SDMA v2.4 Christian König
2018-01-16 19:40   ` [PATCH 08/21] drm/amdgpu: wire up emit_wreg for SDMA v3 Christian König
2018-01-16 19:40   ` [PATCH 09/21] drm/amdgpu: wire up emit_wreg for SDMA v4 Christian König
2018-01-16 19:40   ` [PATCH 10/21] drm/amdgpu: wire up emit_wreg for UVD v6 Christian König
     [not found]     ` <20180116194017.39067-10-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-16 20:01       ` Alex Deucher
     [not found]         ` <CADnq5_Pc2QujuEDmsb8O2E0-VGmMgSCkN2K-B4O_1y-3zrQE7A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-17 12:42           ` Christian König
     [not found]             ` <c33f3adf-66d4-1d37-ebc9-cf3ab7d1b967-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-17 14:22               ` Deucher, Alexander
     [not found]                 ` <BN6PR12MB1652DE27EE111B57EC39AA78F7E90-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-01-17 14:49                   ` Christian König
2018-01-16 19:40   ` [PATCH 11/21] drm/amdgpu: wire up emit_wreg for UVD v7 Christian König
     [not found]     ` <20180116194017.39067-11-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-16 20:05       ` Alex Deucher
     [not found]         ` <CADnq5_MaS1zp4sixq8D5ZdQ-0fheF92k+V=pBYeM1m2PAJFWVQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-17 12:46           ` Christian König
2018-01-16 19:40   ` [PATCH 12/21] drm/amdgpu: wire up emit_wreg for VCE v4 Christian König
2018-01-16 19:40   ` [PATCH 13/21] drm/amdgpu: wire up emit_wreg for VCN v1 Christian König
2018-01-16 19:40   ` [PATCH 14/21] drm/amdgpu: add new amdgpu_gmc_emit_flush_gpu_tlb callback Christian König
     [not found]     ` <20180116194017.39067-14-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-17  6:24       ` Chunming Zhou
     [not found]         ` <abf156ad-44a7-fe7f-12b0-3c1a77757fbd-5C7GfCeVMHo@public.gmane.org>
2018-01-17 12:19           ` Christian König
     [not found]             ` <2d56c566-9a4d-924e-6542-1e406ce1776a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-01-18  7:08               ` Chunming Zhou
     [not found]                 ` <db8d7b0d-bb67-e5fe-299e-a334e483bd19-5C7GfCeVMHo@public.gmane.org>
2018-01-18  8:15                   ` Christian König [this message]
2018-01-16 19:40   ` [PATCH 15/21] drm/amdgpu: implement gmc_v6_0_emit_flush_gpu_tlb Christian König
2018-01-16 19:40   ` [PATCH 16/21] drm/amdgpu: implement gmc_v7_0_emit_flush_gpu_tlb Christian König
2018-01-16 19:40   ` [PATCH 17/21] drm/amdgpu: implement gmc_v8_0_emit_flush_gpu_tlb Christian König
2018-01-16 19:40   ` [PATCH 18/21] drm/amdgpu: implement gmc_v9_0_emit_flush_gpu_tlb Christian König
2018-01-16 19:40   ` [PATCH 19/21] drm/amdgpu: add PASID mapping for GMC v7 Christian König
2018-01-16 19:40   ` [PATCH 20/21] drm/amdgpu: add PASID mapping for GFX v8 Christian König
2018-01-16 19:40   ` [PATCH 21/21] " Christian König
     [not found]     ` <20180116194017.39067-21-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-17  6:11       ` Chunming Zhou
     [not found]         ` <bd8e530b-869f-2cf9-c5b2-8fce9afd2341-5C7GfCeVMHo@public.gmane.org>
2018-01-17  6:12           ` Chunming Zhou
2018-01-17  6:13           ` Chunming Zhou
     [not found]             ` <4d39da90-bbe3-d704-72b5-b5ee27a41b14-5C7GfCeVMHo@public.gmane.org>
2018-01-17  6:15               ` Chunming Zhou
2018-01-16 20:15   ` [PATCH 01/21] drm/amdgpu: wire up emit_wreg for gfx v6 Alex Deucher
     [not found]     ` <CADnq5_ObVUuxn4GxWmZfY5m6MjfDcZHR-jwGS6cGXa7MbA3NMQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-17 13:47       ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2018-01-19 11:48 Christian König
     [not found] ` <20180119114825.1336-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-01-19 11:48   ` [PATCH 14/21] drm/amdgpu: add new amdgpu_gmc_emit_flush_gpu_tlb callback 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=a0aa6214-44c9-12e9-d40b-13a36b4e2788@amd.com \
    --to=christian.koenig-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=zhoucm1-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