Patch 1 is Reviewed-by: Felix Kuehling <Felix.Kuehling@xxxxxxx> Patch 2: I'm not sure we need the "lock" parameter and the invalidation engine parameter. If we're serious about consolidating TLB invalidation between amdgpu and KFD, I think we should use the same invalidation engine and the same lock. Then you also don't need to take the adev->srbm_mutex any more in write_vmid_invalidate_request, which we were abusing for this purpose. Regards, Felix On 2018-10-22 2:41 p.m., Zhao, Yong wrote: > Those register settings have been done in gfxhub_v1_0_program_invalidation() > and mmhub_v1_0_program_invalidation(). > > Change-Id: I9b9b44f17ac2a6ff0c9c78f91885665da75543d0 > Signed-off-by: Yong Zhao <Yong.Zhao@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c | 17 ----------------- > 1 file changed, 17 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c > index 60b5f56c..3ade5d5 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c > @@ -60,11 +60,6 @@ > #define mmMMHUB_VM_INVALIDATE_ENG16_ACK 0x0705 > #define mmMMHUB_VM_INVALIDATE_ENG16_ACK_BASE_IDX 0 > > -#define mmMMHUB_VM_INVALIDATE_ENG16_ADDR_RANGE_LO32 0x0727 > -#define mmMMHUB_VM_INVALIDATE_ENG16_ADDR_RANGE_LO32_BASE_IDX 0 > -#define mmMMHUB_VM_INVALIDATE_ENG16_ADDR_RANGE_HI32 0x0728 > -#define mmMMHUB_VM_INVALIDATE_ENG16_ADDR_RANGE_HI32_BASE_IDX 0 > - > #define V9_PIPE_PER_MEC (4) > #define V9_QUEUES_PER_PIPE_MEC (8) > > @@ -772,18 +767,6 @@ static void write_vmid_invalidate_request(struct kgd_dev *kgd, uint8_t vmid) > * TODO 2: support range-based invalidation, requires kfg2kgd > * interface change > */ > - WREG32(SOC15_REG_OFFSET(GC, 0, mmVM_INVALIDATE_ENG16_ADDR_RANGE_LO32), > - 0xffffffff); > - WREG32(SOC15_REG_OFFSET(GC, 0, mmVM_INVALIDATE_ENG16_ADDR_RANGE_HI32), > - 0x0000001f); > - > - WREG32(SOC15_REG_OFFSET(MMHUB, 0, > - mmMMHUB_VM_INVALIDATE_ENG16_ADDR_RANGE_LO32), > - 0xffffffff); > - WREG32(SOC15_REG_OFFSET(MMHUB, 0, > - mmMMHUB_VM_INVALIDATE_ENG16_ADDR_RANGE_HI32), > - 0x0000001f); > - > WREG32(SOC15_REG_OFFSET(GC, 0, mmVM_INVALIDATE_ENG16_REQ), req); > > WREG32(SOC15_REG_OFFSET(MMHUB, 0, mmMMHUB_VM_INVALIDATE_ENG16_REQ), _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx