Revert "drm/amdgpu: don't attach the tlb fence for SI"
Subsystems (2)
PATCH 1/2 Revert "drm/amdgpu: don't attach the tlb fence for SI"
This reverts commit 47d28900bc2049379b28656cf1e527aa8598925b.
It’s better to validate VM TLB flushes in the flush‑TLB backend rather than in the generic VM layer.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -3
@@ -1069,9 +1069,7 @@ amdgpu_vm_tlb_flush(struct amdgpu_vm_update_params *params, }/* Prepare a TLB flush fence to be attached to PTs */ -if (!params->unlocked && -/* SI doesn't support pasid or KIQ/MES */ - params->adev->family >AMDGPU_FAMILY_SI ) { +if (!params->unlocked) {amdgpu_vm_tlb_fence_create (params->adev, vm, fence);/* Makes sure no PD/PT is freed before the flush */
Signature · 1 line
2.34.1
PATCH 2/2 drm/amdgpu: validate the flush_gpu_tlb_pasid()
Validate flush_gpu_tlb_pasid() availability before flushing tlb.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +4 -0
@@ -780,6 +780,10 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid,return 0 ;if (!adev->gmc.flush_pasid_uses_kiq || !ring->sched.ready) { + +if (!adev->gmc.gmc_funcs->flush_gpu_tlb_pasid) +return 0 ; +if (adev->gmc.flush_tlb_needs_extra_type_2) adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev, pasid, 2, all_hub,
Signature · 1 line
2.34.1
Christian König
maintainerRe: [PATCH 2/2] drm/amdgpu: validate the flush_gpu_tlb_pasid()
Quoted 4 lines · Prike Liang
Validate
flush_gpu_tlb_pasid()availability before flushing tlb.Signed-off-by Prike Liang <[email protected]>Reviewed-by Christian König <[email protected]>
This patch set needs to be re-ordered, e.g. this patch here first and then the other one.
Otherwise you have a state in between where it is broken again.
Apart from that looks good to me.
Regards,
Christian.
Quoted 19 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +4
-0@@ -780,6 +780,10 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct amdgpu_device *adev, uint16_t pasid,return 0 ;if (!adev->gmc.flush_pasid_uses_kiq || !ring->sched.ready) { + +if (!adev->gmc.gmc_funcs->flush_gpu_tlb_pasid) +return 0 ; +if (adev->gmc.flush_tlb_needs_extra_type_2) adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev, pasid, 2, all_hub,
RE: [PATCH 2/2] drm/amdgpu: validate the flush_gpu_tlb_pasid()
[Public]
Yes, I missed that they can be merged separately. I’ll reorder the patch list when merging them.
Regards,
Prike
Quoted 44 lines
-----Original Message-----
From: Koenig, Christian <[email protected]>
Sent: Friday, January 9, 2026 5:09 PM
To: Liang, Prike <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; [email protected]
Subject: Re: [PATCH 2/2] drm/amdgpu: validate theflush_gpu_tlb_pasid()Quoted 4 lines · Prike Liang
Validate
flush_gpu_tlb_pasid()availability before flushing tlb.Signed-off-by Prike Liang <[email protected]>Reviewed-by Christian König <[email protected]>This patch set needs to be re-ordered, e.g. this patch here first and then the other one.
Otherwise you have a state in between where it is broken again.
Apart from that looks good to me.
Regards,
Christian.Review
Quoted 5 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 4 ++++ 1 file changed, 4 insertions(+)(quoted diff) +0
-0
b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.cdrivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c int amdgpu_gmc_flush_gpu_tlb_pasid(struct
Quoted 4 lines
index
6d7b8bb953ae..0e67fa4338ff100644drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +0
-0@@ -780,6 +780,10 @@ int amdgpu_gmc_flush_gpu_tlb_pasid(struct
amdgpu_device*adev,uint16_tpasid,Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +4
-0return 0 ;if (!adev->gmc.flush_pasid_uses_kiq || !ring->sched.ready) { + +if (!adev->gmc.gmc_funcs->flush_gpu_tlb_pasid) +return 0 ; +if (adev->gmc.flush_tlb_needs_extra_type_2) adev->gmc.gmc_funcs->flush_gpu_tlb_pasid(adev, pasid, 2, all_hub,
Quoted 6 lines · Prike Liang
This reverts commit
47d28900bc2049379b28656cf1e527aa8598925b.It’s better to validate VM TLB flushes in the flush‑TLB backend rather than in the generic VM layer.
Signed-off-by Prike Liang <[email protected]>
Quoted 19 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1
-3@@ -1069,9 +1069,7 @@ amdgpu_vm_tlb_flush(struct amdgpu_vm_update_params *params, }/* Prepare a TLB flush fence to be attached to PTs */ -if (!params->unlocked && -/* SI doesn't support pasid or KIQ/MES */ - params->adev->family >AMDGPU_FAMILY_SI ) { +if (!params->unlocked) {amdgpu_vm_tlb_fence_create (params->adev, vm, fence);/* Makes sure no PD/PT is freed before the flush */