From 571622740288f801042a28598440a098249213fa Mon Sep 17 00:00:00 2001 From: Andrzej Hajda Date: Fri, 27 Oct 2023 11:42:55 +0200 Subject: drm/xe: implement driver initiated function-reset Driver initiated function-reset (FLR) is the highest level of reset that we can trigger from within the driver. In contrast to PCI FLR it doesn't require re-enumeration of PCI BAR. It can be useful in case GT fails to reset. It is also the only way to trigger GSC reset from the driver and can be used in future addition of GSC support. v2: - use regs from xe_regs.h - move the flag to xe.mmio - call flr only on root gt - use BIOS protection check - copy/paste comments from i915 v3: - flr code moved to xe_device.c v4: - needs_flr_on_fini moved to xe_device Signed-off-by: Andrzej Hajda Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Rodrigo Vivi --- drivers/gpu/drm/xe/xe_gt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/drm/xe/xe_gt.c') diff --git a/drivers/gpu/drm/xe/xe_gt.c b/drivers/gpu/drm/xe/xe_gt.c index d380f67b3365..73c090762771 100644 --- a/drivers/gpu/drm/xe/xe_gt.c +++ b/drivers/gpu/drm/xe/xe_gt.c @@ -626,6 +626,8 @@ err_fail: xe_uevent_gt_reset_failure(to_pci_dev(gt_to_xe(gt)->drm.dev), gt_to_tile(gt)->id, gt->info.id); + gt_to_xe(gt)->needs_flr_on_fini = true; + return err; } -- cgit v1.2.3