drm/amdgpu: always flush the TLB on gfx8
Subsystems (2)
PATCH 1/1 drm/amdgpu: always flush the TLB on gfx8
The TLB on GFX8 stores each block of 8 PTEs where any of the valid bits are set.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +5 -0
@@ -847,6 +847,11 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm, flush_tlb |= adev->gmc.xgmi.num_physical_nodes && adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,0 ); +/* +* On GFX8 and older any 8 PTE block with a valid bit set enters the TLB +*/ + flush_tlb |= adev->ip_versions[GC_HWIP ][0 ] <IP_VERSION (9 ,0 ,0 ); +memset (¶ms,0 ,sizeof (params)); params.adev = adev; params.vm = vm;
Signature · 1 line
2.25.1
Hi Christian,
This patch fixes almost all GPU faults on polaris caused by 86fd5edfbdae "drm/amdgpu: rework TLB flushing".
I still get occasional faults though, about 1 every 3 runs of a subset of piglit tests.
Thanks,
Pierre-Eric
Quoted 25 lines · Christian König
The TLB on GFX8 stores each block of 8 PTEs where any of the valid bits are set.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +5
-0@@ -847,6 +847,11 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm, flush_tlb |= adev->gmc.xgmi.num_physical_nodes && adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,0 ); +/* +* On GFX8 and older any 8 PTE block with a valid bit set enters the TLB +*/ + flush_tlb |= adev->ip_versions[GC_HWIP ][0 ] <IP_VERSION (9 ,0 ,0 ); +memset (¶ms,0 ,sizeof (params)); params.adev = adev; params.vm = vm;
Quoted 5 lines · Christian König
The TLB on GFX8 stores each block of 8 PTEs where any of the valid bits are set.
Signed-off-by Christian König <[email protected]>
Quoted 23 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +5
-1@@ -847,6 +847,11 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm, flush_tlb |= adev->gmc.xgmi.num_physical_nodes && adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,0 ); +/* +* On GFX8 and older any 8 PTE block with a valid bit set enters the TLB +*/ + flush_tlb |= adev->ip_versions[GC_HWIP ][0 ] <IP_VERSION (9 ,0 ,0 ); +memset (¶ms,0 ,sizeof (params)); params.adev = adev; params.vm = vm; --2.25.1
Am 07.06.22 um 22:27 schrieb Alex Deucher:
Quoted 7 lines
Quoted 4 lines · Christian König
The TLB on GFX8 stores each block of 8 PTEs where any of the valid bits are set.
Signed-off-by Christian König <[email protected]>Reviewed-by Alex Deucher <[email protected]>
Alex could you push this? It's an important fix, but I'm seriously not feeling well at the moment.
Thanks,
Christian.
Quoted 24 lines
Quoted 24 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +5
-1@@ -847,6 +847,11 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm, flush_tlb |= adev->gmc.xgmi.num_physical_nodes && adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,0 ); +/* +* On GFX8 and older any 8 PTE block with a valid bit set enters the TLB +*/ + flush_tlb |= adev->ip_versions[GC_HWIP ][0 ] <IP_VERSION (9 ,0 ,0 ); +memset (¶ms,0 ,sizeof (params)); params.adev = adev; params.vm = vm; --2.25.1
yes. will do.
Alex
Quoted 41 lines · Christian König
Am 07.06.22 um 22:27 schrieb Alex Deucher:
Quoted 7 lines
Quoted 4 lines · Christian König
The TLB on GFX8 stores each block of 8 PTEs where any of the valid bits are set.
Signed-off-by Christian König <[email protected]>Reviewed-by Alex Deucher <[email protected]>Alex could you push this? It's an important fix, but I'm seriously not feeling well at the moment.
Thanks,
Christian.Quoted 24 lines
Quoted 24 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +5
-1@@ -847,6 +847,11 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm, flush_tlb |= adev->gmc.xgmi.num_physical_nodes && adev->ip_versions[GC_HWIP ][0 ] ==IP_VERSION (9 ,4 ,0 ); +/* +* On GFX8 and older any 8 PTE block with a valid bit set enters the TLB +*/ + flush_tlb |= adev->ip_versions[GC_HWIP ][0 ] <IP_VERSION (9 ,0 ,0 ); +memset (¶ms,0 ,sizeof (params)); params.adev = adev; params.vm = vm; --2.25.1