Commit 9a9d960d authored by Zhanjun Dong's avatar Zhanjun Dong Committed by Matthew Brost
Browse files

drm/xe/uc: Drop xe_guc_sanitize in favor of managed cleanup



If the firmware fails to load in GT resets the device is wedged also
initiating a GuC state cleanup.

Signed-off-by: default avatarZhanjun Dong <zhanjun.dong@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260310225039.1320161-7-zhanjun.dong@intel.com
parent dace8cb0
Loading
Loading
Loading
Loading
+7 −15
Original line number Diff line number Diff line
@@ -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)