drm/xe: Ignore GGTT TLB inval errors during GT reset
Subsystems (2)
PATCH 1/1 drm/xe: Ignore GGTT TLB inval errors during GT reset
During GT reset, GGTT TLB invalidations may fail. This is acceptable as the reset will clear GGTT caches. Suppress only -ECANCELED other return codes are still unexpected error.
Suggested-by Matthew Brost <[email protected]>
Signed-off-by Nirmoy Das <[email protected]>
--- drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c +7 -2
@@ -253,9 +253,14 @@ static int xe_gt_tlb_invalidation_guc(struct xe_gt *gt,0 ,/* seqno, replaced in send_tlb_invalidation */ MAKE_INVAL_OP(XE_GUC_TLB_INVAL_GUC), }; +int ret; + + ret =send_tlb_invalidation (>->uc.guc, fence, action, +ARRAY_SIZE (action)); +if (ret == -ECANCELED ) +return 0 ; -return send_tlb_invalidation (>->uc.guc, fence, action, -ARRAY_SIZE (action)); +return ret; }/**
Signature · 1 line
2.46.0
Quoted 16 lines · Nirmoy Das
During GT reset, GGTT TLB invalidations may fail. This is acceptable as the reset will clear GGTT caches. Suppress only
-ECANCELEDother return codes are still unexpected error.Suggested-by Matthew Brost <[email protected]>Signed-off-by Nirmoy Das <[email protected]>--- drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c +0
-0
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c static int xe_gt_tlb_invalidation_guc(struct xe_gt *gt, · line 259
Quoted 7 lines
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c +4
-0@@ -253,9 +253,14 @@ static int xe_gt_tlb_invalidation_guc(struct xe_gt *gt,0 ,/* seqno, replaced in send_tlb_invalidation */ MAKE_INVAL_OP(XE_GUC_TLB_INVAL_GUC), }; +int ret; + + ret =send_tlb_invalidation (>->uc.guc, fence, action, +ARRAY_SIZE (action));
Add a comment along the lines of '-ECANCELED indicates the CT is stopped for a GT reset in which the TLB caches should be nuked'.
Otherwise LGTM.
Reviewed-by Matthew Brost <[email protected]>
Quoted 12 lines
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c +3
-2+if (ret == -ECANCELED ) +return 0 ; -return send_tlb_invalidation (>->uc.guc, fence, action, -ARRAY_SIZE (action)); +return ret; }/** Signature · 1 line
2.46.0