]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Cleanup extra calls to xe_hw_fence_irq_finish()
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 13 Feb 2025 19:29:04 +0000 (11:29 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 14 Feb 2025 19:42:55 +0000 (11:42 -0800)
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>
drivers/gpu/drm/xe/xe_gt.c

index c33040278e1aa6327e04dbeb09dc2287d542cf5a..bd16ca070dd20242cee3da9b32c7d3c963a2acf1 100644 (file)
@@ -389,13 +389,11 @@ static void dump_pat_on_error(struct xe_gt *gt)
 static int gt_fw_domain_init(struct xe_gt *gt)
 {
        unsigned int fw_ref;
-       int err, i;
+       int err;
 
        fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);
-       if (!fw_ref) {
-               err = -ETIMEDOUT;
-               goto err_hw_fence_irq;
-       }
+       if (!fw_ref)
+               return -ETIMEDOUT;
 
        if (!xe_gt_is_media_type(gt)) {
                err = xe_ggtt_init(gt_to_tile(gt)->mem.ggtt);
@@ -436,9 +434,6 @@ static int gt_fw_domain_init(struct xe_gt *gt)
 err_force_wake:
        dump_pat_on_error(gt);
        xe_force_wake_put(gt_to_fw(gt), fw_ref);
-err_hw_fence_irq:
-       for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
-               xe_hw_fence_irq_finish(&gt->fence_irq[i]);
 
        return err;
 }
@@ -446,7 +441,7 @@ err_hw_fence_irq:
 static int all_fw_domain_init(struct xe_gt *gt)
 {
        unsigned int fw_ref;
-       int err, i;
+       int err;
 
        fw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
        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)
 
 err_force_wake:
        xe_force_wake_put(gt_to_fw(gt), fw_ref);
-       for (i = 0; i < XE_ENGINE_CLASS_MAX; ++i)
-               xe_hw_fence_irq_finish(&gt->fence_irq[i]);
 
        return err;
 }