Am 14.11.2017 um 03:30 schrieb Chunming Zhou: > > > On 2017å¹´11æ??14æ?¥ 01:22, Christian König wrote: >> Am 13.11.2017 um 17:12 schrieb Oak Zeng: >>> From: ozeng <oak.zeng at amd.com> >>> >>> Properly allocate TLB invalidation engine to avoid conflict. >>> The latest engine allocation on gfx9 is: >>> Engine 0, 1: idle >>> Engine 2, 3: firmware >>> Engine 4~13: amdgpu ring, subject to change when ring number changes >>> Engine 14~15: idle >>> Engine 16: kfd tlb invalidation >>> Engine 17: Gart flushes > Moving these comments to code file will be better. Good point. Oak please take care of documenting this in the code. Just another patch adding this as comment above "unsigned vm_inv_eng[AMDGPU_MAX_VMHUBS] = { 4, 4 }; " should be fine. Regards, Christian. > > Regards, > David Zhou >>> >>> Change-Id: I9a32cbcb133c07d7efad1a7bd07c6e2098c747e7 >>> Signed-off-by: Oak Zeng <Oak.Zeng at amd.com> >> >> Acked-by: Christian König <christian.koenig at amd.com> >> >>> --- >>>  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 +++--- >>>  1 file changed, 3 insertions(+), 3 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c >>> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c >>> index 16bba97..c264391 100644 >>> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c >>> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c >>> @@ -392,7 +392,7 @@ static int gmc_v9_0_early_init(void *handle) >>>  static int gmc_v9_0_late_init(void *handle) >>>  { >>>      struct amdgpu_device *adev = (struct amdgpu_device *)handle; >>> -   unsigned vm_inv_eng[AMDGPU_MAX_VMHUBS] = { 3, 3 }; >>> +   unsigned vm_inv_eng[AMDGPU_MAX_VMHUBS] = { 4, 4 }; >>>      unsigned i; >>>       for(i = 0; i < adev->num_rings; ++i) { >>> @@ -405,9 +405,9 @@ static int gmc_v9_0_late_init(void *handle) >>>               ring->funcs->vmhub); >>>      } >>>  -   /* Engine 17 is used for GART flushes */ >>> +   /* Engine 16 is used for KFD and 17 for GART flushes */ >>>      for(i = 0; i < AMDGPU_MAX_VMHUBS; ++i) >>> -       BUG_ON(vm_inv_eng[i] > 17); >>> +       BUG_ON(vm_inv_eng[i] > 16); >>>       return amdgpu_irq_get(adev, &adev->mc.vm_fault, 0); >>>  } >> >> >> _______________________________________________ >> amd-gfx mailing list >> amd-gfx at lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/amd-gfx >