[PATCH] drm/xe/xe_gt_debugfs: Use force_reset for duplicated code
Jonathan Cavitt
jonathan.cavitt at intel.com
Thu Jun 6 17:43:04 UTC 2024
force_reset_sync performs the same actions as force_reset, but performs
a flush_work afterwards as a means of syncing on the reset. Use
force_reset instead of duplicating the code.
Suggested-by: Lucas De Marchi <lucas.demarchi at intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
CC: Matthew Brost <matthew.brost at intel.com>
---
drivers/gpu/drm/xe/xe_gt_debugfs.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c
index 5e7fd937917a1..9bf703ccaa4f7 100644
--- a/drivers/gpu/drm/xe/xe_gt_debugfs.c
+++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c
@@ -118,10 +118,7 @@ static int force_reset(struct xe_gt *gt, struct drm_printer *p)
static int force_reset_sync(struct xe_gt *gt, struct drm_printer *p)
{
- xe_pm_runtime_get(gt_to_xe(gt));
- xe_gt_reset_async(gt);
- xe_pm_runtime_put(gt_to_xe(gt));
-
+ force_reset(gt, p);
flush_work(>->reset.worker);
return 0;
--
2.25.1
More information about the Intel-xe
mailing list