[PATCH] drm/xe: fix enable survivability mode

Riana Tauro riana.tauro at intel.com
Thu Mar 6 07:43:51 UTC 2025



On 3/6/2025 11:34 AM, Lucas De Marchi wrote:
> On Thu, Mar 06, 2025 at 11:24:07AM +0530, Riana Tauro wrote:
>> The current implementation skipped entering survivability mode even when
>> survivability enable returned success. Enter survivability mode
>> if enable returns success
>>
>> Fixes: d40f275d96e8 ("drm/xe: Move survivability entirely to xe_pci")
>> Signed-off-by: Riana Tauro <riana.tauro at intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_pci.c | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
>> index 6b5fa067b39b..ee0665e54489 100644
>> --- a/drivers/gpu/drm/xe/xe_pci.c
>> +++ b/drivers/gpu/drm/xe/xe_pci.c
>> @@ -857,9 +857,8 @@ static int xe_pci_probe(struct pci_dev *pdev, 
>> const struct pci_device_id *ent)
>>      * HW to be enabled. In that case enable it and return success.
>>      */
>>     if (err) {
>> -        if (xe_survivability_mode_required(xe) &&
>> -            xe_survivability_mode_enable(xe))
>> -            return 0;
>> +        if (xe_survivability_mode_required(xe))
>> +            return xe_survivability_mode_enable(xe);
> 
> ugh... the mix of bool and int above threw me off. I remember fixing it
> but probably forgot to put it in the series.
yeah missed it during the review too.
Thanks for the review. Will check if any test can be added for this.

Thanks
Riana
> 
> +Francois
> 
> Can we inject 2 errors to easily test this in igt?
> 
> 1. xe_device_probe_early() to return error
> 2. xe_survivability_mode_required to return true
> 
> Thanks,
> Lucas De Marchi
> 
> 
>>
>>         return err;
>>     }
>> -- 
>> 2.47.1
>>



More information about the Intel-xe mailing list