]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/uc: Drop xe_guc_sanitize in favor of managed cleanup
authorZhanjun Dong <zhanjun.dong@intel.com>
Tue, 10 Mar 2026 22:50:38 +0000 (18:50 -0400)
committerMatthew Brost <matthew.brost@intel.com>
Sat, 14 Mar 2026 01:04:15 +0000 (18:04 -0700)
If the firmware fails to load in GT resets the device is wedged also
initiating a GuC state cleanup.

Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260310225039.1320161-7-zhanjun.dong@intel.com
drivers/gpu/drm/xe/xe_uc.c

index d9aa845a308d52facb3dbbaf9bc18f519f5b666d..75091bde0d50c4ab48ad2c19244dfa53494e8890 100644 (file)
@@ -157,23 +157,19 @@ static int vf_uc_load_hw(struct xe_uc *uc)
 
        err = xe_gt_sriov_vf_connect(uc_to_gt(uc));
        if (err)
-               goto err_out;
+               return err;
 
        uc->guc.submission_state.enabled = true;
 
        err = xe_guc_opt_in_features_enable(&uc->guc);
        if (err)
-               goto err_out;
+               return err;
 
        err = xe_gt_record_default_lrcs(uc_to_gt(uc));
        if (err)
-               goto err_out;
+               return err;
 
        return 0;
-
-err_out:
-       xe_guc_sanitize(&uc->guc);
-       return err;
 }
 
 /*
@@ -205,19 +201,19 @@ int xe_uc_load_hw(struct xe_uc *uc)
 
        ret = xe_gt_record_default_lrcs(uc_to_gt(uc));
        if (ret)
-               goto err_out;
+               return ret;
 
        ret = xe_guc_post_load_init(&uc->guc);
        if (ret)
-               goto err_out;
+               return ret;
 
        ret = xe_guc_pc_start(&uc->guc.pc);
        if (ret)
-               goto err_out;
+               return ret;
 
        ret = xe_guc_rc_enable(&uc->guc);
        if (ret)
-               goto err_out;
+               return ret;
 
        xe_guc_engine_activity_enable_stats(&uc->guc);
 
@@ -232,10 +228,6 @@ int xe_uc_load_hw(struct xe_uc *uc)
        xe_gsc_load_start(&uc->gsc);
 
        return 0;
-
-err_out:
-       xe_guc_sanitize(&uc->guc);
-       return ret;
 }
 
 int xe_uc_reset_prepare(struct xe_uc *uc)