[PATCH v3 1/3] drm/xe: Move survivability back to xe

Lucas De Marchi lucas.demarchi at intel.com
Fri Mar 14 13:43:58 UTC 2025


On Thu, Mar 13, 2025 at 11:30:29AM +0530, Riana Tauro wrote:
>>@@ -705,8 +706,20 @@ int xe_device_probe_early(struct xe_device *xe)
>>  	sriov_update_device_info(xe);
>>  	err = xe_pcode_probe_early(xe);
>>-	if (err)
>>+	if (err) {
>>+		int save_err = err;
>>+
>>+		/*
>>+		 * Try to leave device in survivability mode if device is
>>+		 * possible, but still return the previous error for error
>>+		 * propagation
>>+		 */
>>+		err = xe_survivability_mode_enable(xe);
>>+		if (!err)
>>+			return save_err;
>>+
>nit:
>
>This would be better.
>
>if (err)
>   return err;

agreed. I changed that in v4.

>>diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
>>index d939ce70e6fa8..0d57ad1596edf 100644
>>--- a/drivers/gpu/drm/xe/xe_survivability_mode.c
>>+++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
>>@@ -178,15 +178,16 @@ bool xe_survivability_mode_is_enabled(struct xe_device *xe)
>>  	return xe->survivability.mode;
>>  }
>>-/**
>>- * xe_survivability_mode_required - checks if survivability mode is required
>>+/*
>>+ * xe_survivability_mode_requested - check if it's possible to enable
>>+ * survivability mode and requested by HW
>>   * @xe: xe device instance
>>   *
>>- * This function reads the boot status from Pcode
>>+ * This function reads the boot status from Pcode.
>>   *
>>- * Return: true if boot status indicates failure, false otherwise
>>+ * Return: true if boot status indicates failure, false otherwise.
>>   */
>>-bool xe_survivability_mode_required(struct xe_device *xe)
>>+static bool xe_survivability_mode_requested(struct xe_device *xe)
>since this function is static, xe prefix and doc can be removed

yeah.. I do prefer keeping prefixes out for static functions, but it's
kind of a lost battle as it's pretty hard to maintain consistency across
the board. I forgot to change it in v4, I will submit a new one there.

Note however that the docs stay - it's just not kernel-doc anymore
because of:

-/**
+/*

thanks
Lucas De Marchi


More information about the Intel-xe mailing list