Re: [PATCH v2 02/11] drm/xe/xe_survivability: Decouple survivability info from boot survivability

Tauro, Riana
2026-03-30T13:00:48Z

On 3/2/2026 10:30 PM, Raag Jadav wrote:
> On Mon, Mar 02, 2026 at 03:51:57PM +0530, Riana Tauro wrote:
>> On CSC runtime firmware errors that requires firmware flash through SPI,
>> PCODE sets the FDO mode bit in the Capability register.
>> Currently the survivability_info group is created only for boot
>> survivability.
>>
>> Create survivability_info group even for runtime survivability to allow
>> userspace to check FDO mode sysfs.
>>
>> Signed-off-by: Riana Tauro <riana.tauro@intel.com>
>> ---
>> drivers/gpu/drm/xe/xe_survivability_mode.c | 12 +++++++++++-
>> 1 file changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
>> index db64cac39c94..70feb192fa2f 100644
>> --- a/drivers/gpu/drm/xe/xe_survivability_mode.c
>> +++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
>> @@ -98,6 +98,15 @@
>> * # cat /sys/bus/pci/devices/<device>/survivability_mode
>> * Runtime
>> *
>> + * On some CSC firmware errors, PCODE sets FDO mode and the only recovery possible is through
>> + * firmware flash using SPI driver. Userspace can check if FDO mode is set by checking the below
>> + * sysfs entry.
>> + *
>> + * .. code-block:: shell
>> + *
>> + * # cat /sys/bus/pci/devices/<device>/survivability_info/fdo_mode
>> + * enabled
> Currently FDO_INFO is defined as (MAX_SCRATCH_REG + 1), but I couldn't
> find this case in survivability_info_attrs_visible(). Or did I miss
> something?

This check is present in survivability_info_attrs_visible
&attr_fdo_mode.attr.attr is at the last index.  This is made visible
based on survivability mode version.
I will be sending this as a separate patch too.

Thanks
Riana

>
> Raag
>
>> * When such errors occur, userspace is notified with the drm device wedged uevent and runtime
>> * survivability mode. User can then initiate a firmware flash using userspace tools like fwupd
>> * to restore device to normal operation.
>> @@ -296,7 +305,8 @@ static int create_survivability_sysfs(struct pci_dev *pdev)
>> if (ret)
>> return ret;
>>
>> - if (check_boot_failure(xe)) {
>> + /* Surivivability info is not required if enabled via configfs */
>> + if (!xe_configfs_get_survivability_mode(pdev)) {
>> ret = devm_device_add_group(dev, &survivability_info_group);
>> if (ret)
>> return ret;
>> --
>> 2.47.1
>>