mirror of
https://github.com/torvalds/linux.git
synced 2026-04-25 18:12:26 -04:00
Commitd40f275d96("drm/xe: Move survivability entirely to xe_pci") moved the survivability handling to be done entirely in the xe_pci layer. However there are some issues with that approach: 1) Survivability mode needs at least the mmio initialized, otherwise it can't really read a register to decide if it should enter that state 2) SR-IOV mode should be initialized, otherwise it's not possible to check if it's VF Besides, as pointed by Riana the check for xe_survivability_mode_enable() was wrong in xe_pci_probe() since it's not a bool return. Fix that by moving the initialization to be entirely in the xe_device layer, with the correct dependencies handled: only after mmio and sriov initialization, and not triggering it on error from wait_for_lmem_ready(). This restores the trigger behavior before that commit. The xe_pci layer now only checks for "is it enabled?", like it's doing in xe_pci_suspend()/xe_pci_remove(), etc. Cc: Riana Tauro <riana.tauro@intel.com> Fixes:d40f275d96("drm/xe: Move survivability entirely to xe_pci") Reviewed-by: Riana Tauro <riana.tauro@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250314-fix-survivability-v5-1-fdb3559ea965@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> (cherry picked from commit86b5e0dbba) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
17 lines
353 B
C
17 lines
353 B
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2025 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_SURVIVABILITY_MODE_H_
|
|
#define _XE_SURVIVABILITY_MODE_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct xe_device;
|
|
|
|
int xe_survivability_mode_enable(struct xe_device *xe);
|
|
bool xe_survivability_mode_is_enabled(struct xe_device *xe);
|
|
|
|
#endif /* _XE_SURVIVABILITY_MODE_H_ */
|