drm/xe: Add configfs to enable survivability mode

Registers a configfs subsystem called 'xe' that creates a
directory in the mounted configfs directory (/sys/kernel/config)
Userspace can then create the device that has to be configured
under the xe directory

	mkdir /sys/kernel/config/xe/0000:03:00.0

The device created will have the following attributes to be
configured

	/sys/kernel/config/xe/
		.. 0000:03:00.0/
			... survivability_mode

v2: fix kernel-doc
    fix return value (Lucas)

v3: fix kernel-doc (Lucas)

Signed-off-by: Riana Tauro <riana.tauro@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250407051414.1651616-2-riana.tauro@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
This commit is contained in:
Riana Tauro
2025-04-07 10:44:11 +05:30
committed by Lucas De Marchi
parent 1e1981b16b
commit 16280ded45
6 changed files with 221 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
#include <drm/drm_module.h>
#include "xe_drv.h"
#include "xe_configfs.h"
#include "xe_hw_fence.h"
#include "xe_pci.h"
#include "xe_pm.h"
@@ -88,6 +89,10 @@ static const struct init_funcs init_funcs[] = {
{
.init = xe_check_nomodeset,
},
{
.init = xe_configfs_init,
.exit = xe_configfs_exit,
},
{
.init = xe_hw_fence_module_init,
.exit = xe_hw_fence_module_exit,