[PATCH v3 2/3] drm/xe: Set survivability mode before heci init

Riana Tauro riana.tauro at intel.com
Thu Mar 13 05:32:45 UTC 2025


Hi Lucas

On 3/13/2025 2:41 AM, Lucas De Marchi wrote:
> Commit d40f275d96e8 ("drm/xe: Move survivability entirely to xe_pci")
> tried to follow the logic: initialize everything needed and if
> everything succeeds, set the flag that it's enabled. While it fixed some
> corner cases of those calls failing, it was wrong for setting the flag
> after the call to xe_heci_gsc_init(): that function does a different
> initialization for survivability mode.
> 
> Fix that and add comments about this being done on purpose.
> 
> Suggested-by: Riana Tauro <riana.tauro at intel.com>
> Fixes: d40f275d96e8 ("drm/xe: Move survivability entirely to xe_pci")
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>

Thank you for adding the patch in the series.
Looks good to me
Reviewed-by: Riana Tauro <riana.tauro at intel.com>
> ---
>   drivers/gpu/drm/xe/xe_survivability_mode.c | 12 ++++++++++--
>   1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
> index 0d57ad1596edf..359d5b961c750 100644
> --- a/drivers/gpu/drm/xe/xe_survivability_mode.c
> +++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
> @@ -155,13 +155,21 @@ static int enable_survivability_mode(struct pci_dev *pdev)
>   	if (ret)
>   		return ret;
>   
> +	/* Make sure xe_heci_gsc_init() knows about survivability mode */
> +	survivability->mode = true;
> +
>   	ret = xe_heci_gsc_init(xe);
> -	if (ret)
> +	if (ret) {
> +		/*
> +		 * But if it fails, device can't enter survivability
> +		 * so move it back for correct error handling
> +		 */
> +		survivability->mode = false;
>   		return ret;
> +	}
>   
>   	xe_vsec_init(xe);
>   
> -	survivability->mode = true;
>   	dev_err(dev, "In Survivability Mode\n");
>   
>   	return 0;
> 



More information about the Intel-xe mailing list