Skip to content

Commit f5ebe80

Browse files
committed
drm/xe: Cleanup extra calls to xe_hw_fence_irq_finish()
Now that xe_gt_remove is handled entirely by xe_gt, it's clear there are some extra calls to xe_hw_fence_irq_finish() that aren't necessary. Neither all_fw_domain_init() or gt_fw_domain_init() need to do that since it's handled by the caller on any error. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250213192909.996148-8-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
1 parent ff6cd29 commit f5ebe80

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

drivers/gpu/drm/xe/xe_gt.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,11 @@ static void dump_pat_on_error(struct xe_gt *gt)
389389
static int gt_fw_domain_init(struct xe_gt *gt)
390390
{
391391
unsigned int fw_ref;
392-
int err, i;
392+
int err;
393393

394394
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
395-
if (!fw_ref) {
396-
err = -ETIMEDOUT;
397-
goto err_hw_fence_irq;
398-
}
395+
if (!fw_ref)
396+
return -ETIMEDOUT;
399397

400398
if (!xe_gt_is_media_type(gt)) {
401399
err = xe_ggtt_init(gt_to_tile(gt)->mem.ggtt);
@@ -436,17 +434,14 @@ static int gt_fw_domain_init(struct xe_gt *gt)
436434
err_force_wake:
437435
dump_pat_on_error(gt);
438436
xe_force_wake_put(gt_to_fw(gt), fw_ref);
439-
err_hw_fence_irq:
440-
for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
441-
xe_hw_fence_irq_finish(&gt->fence_irq[i]);
442437

443438
return err;
444439
}
445440

446441
static int all_fw_domain_init(struct xe_gt *gt)
447442
{
448443
unsigned int fw_ref;
449-
int err, i;
444+
int err;
450445

451446
fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
452447
if (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) {
@@ -524,8 +519,6 @@ static int all_fw_domain_init(struct xe_gt *gt)
524519

525520
err_force_wake:
526521
xe_force_wake_put(gt_to_fw(gt), fw_ref);
527-
for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
528-
xe_hw_fence_irq_finish(&gt->fence_irq[i]);
529522

530523
return err;
531524
}

0 commit comments

Comments
 (0)