From: "Summers, Stuart" <stuart.summers@intel.com>
To: "Roper, Matthew D" <matthew.d.roper@intel.com>
Cc: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
"Brost, Matthew" <matthew.brost@intel.com>,
"Nerlige Ramappa, Umesh" <umesh.nerlige.ramappa@intel.com>,
"Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>,
"Sousa, Gustavo" <gustavo.sousa@intel.com>,
"Lin, Shuicheng" <shuicheng.lin@intel.com>
Subject: Re: [PATCH 04/16] drm/xe: Require CONFIGFS_FS
Date: Mon, 28 Sep 2026 16:46:24 +0000 [thread overview]
Message-ID: <fefc463daa7401eff04fd28be098e9108d0f4980.camel@intel.com> (raw)
In-Reply-To: <20260925231647.GK730887@mdroper-desk1.amr.corp.intel.com>
On Fri, 2026-09-25 at 16:16 -0700, Matt Roper wrote:
> On Thu, Sep 24, 2026 at 11:01:23PM +0000, Stuart Summers wrote:
> > configfs is not optional for xe in practice: a growing set of
> > device
>
> I'm not sure I agree with this claim; the Xe driver is certainly
> usable
> today without configfs and most users will never have any need to use
> it
> (and most are probably unaware of its existence). Having configfs
> will
> give you a small number of additional features for certain corner
> cases
> (such as survivability mode), and those capabilities might be crucial
> to
> specific users, but they're not mandatory for general use of the
> driver
> or hardwawre. In fact even features like survivability mode are only
> relevant on a specific subset of the platforms supported by Xe. I'm
> not
> sure if there's any end-user use case for configfs today on igpu
> platforms for example.
>
> I believe most distribution kernels do include configfs support
> today,
> so this support will usually be there if general users need it. But
> if
> someone makes a conscious decision that they want a very small kernel
> and they feel they don't need any of the extra features offered by
> configfs, then that's really their call to make. There are a lot of
> embedded system use cases where something like configfs just isn't
> going
> to be useful because you can't get at it anyway through the
> interfaces
> the device makes available, and including unnecessary facilities like
> configfs can interfere with certification requirements, timing
> requirements, etc.
Hm.. yeah I understand what you're saying and it's a good point. I was
hoping we could get rid of the dangling code here, but maybe it's
better to keep it for those use cases. I can drop this next rev.
Thanks,
Stuart
>
>
> Matt
>
> > settings is only reachable through it, and the !CONFIGFS_FS stubs
> > silently return defaults instead, so those builds quietly ignore
> > every
> > configfs knob. Select it and drop the stubs rather than keep
> > growing a
> > second, no-op copy of the getter API.
> >
> > Signed-off-by: Stuart Summers <stuart.summers@intel.com>
> > Assisted-by: Copilot:claude-opus-5
> > ---
> > drivers/gpu/drm/xe/Kconfig | 1 +
> > drivers/gpu/drm/xe/Makefile | 2 +-
> > drivers/gpu/drm/xe/xe_configfs.h | 32 ----------------------------
> > ----
> > 3 files changed, 2 insertions(+), 33 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/xe/Kconfig
> > b/drivers/gpu/drm/xe/Kconfig
> > index 4d7dcaff2b91..a24b5e574699 100644
> > --- a/drivers/gpu/drm/xe/Kconfig
> > +++ b/drivers/gpu/drm/xe/Kconfig
> > @@ -6,6 +6,7 @@ config DRM_XE
> > depends on INTEL_VSEC || !INTEL_VSEC
> > depends on X86_PLATFORM_DEVICES || !(X86 && ACPI)
> > depends on PAGE_SIZE_4KB || COMPILE_TEST || BROKEN
> > + select CONFIGFS_FS
> > select INTERVAL_TREE
> > # we need shmfs for the swappable backing store, and in
> > particular
> > # the shmem_readpage() which depends upon tmpfs
> > diff --git a/drivers/gpu/drm/xe/Makefile
> > b/drivers/gpu/drm/xe/Makefile
> > index ba4404896f2f..aa5d6184713b 100644
> > --- a/drivers/gpu/drm/xe/Makefile
> > +++ b/drivers/gpu/drm/xe/Makefile
> > @@ -164,7 +164,7 @@ xe-$(CONFIG_DRM_GPUSVM) += xe_userptr.o
> > xe-$(CONFIG_HWMON) += xe_hwmon.o
> >
> > xe-$(CONFIG_PERF_EVENTS) += xe_pmu.o
> > -xe-$(CONFIG_CONFIGFS_FS) += xe_configfs.o
> > +xe-y += xe_configfs.o
> >
> > # graphics virtualization (SR-IOV) support
> > xe-y += \
> > diff --git a/drivers/gpu/drm/xe/xe_configfs.h
> > b/drivers/gpu/drm/xe/xe_configfs.h
> > index f89dc0ffb884..ff902d7488ca 100644
> > --- a/drivers/gpu/drm/xe/xe_configfs.h
> > +++ b/drivers/gpu/drm/xe/xe_configfs.h
> > @@ -5,16 +5,12 @@
> > #ifndef _XE_CONFIGFS_H_
> > #define _XE_CONFIGFS_H_
> >
> > -#include <linux/limits.h>
> > #include <linux/types.h>
> >
> > -#include "xe_defaults.h"
> > #include "xe_hw_engine_types.h"
> > -#include "xe_module.h"
> >
> > struct pci_dev;
> >
> > -#if IS_ENABLED(CONFIG_CONFIGFS_FS)
> > int xe_configfs_init(void);
> > void xe_configfs_exit(void);
> > void xe_configfs_check_device(struct pci_dev *pdev);
> > @@ -35,33 +31,5 @@ ssize_t
> > xe_configfs_get_ctx_restore_post_bb(struct pci_dev *pdev,
> > unsigned int xe_configfs_get_max_vfs(struct pci_dev *pdev);
> > bool xe_configfs_admin_only_pf(struct pci_dev *pdev);
> > #endif
> > -#else
> > -static inline int xe_configfs_init(void) { return 0; }
> > -static inline void xe_configfs_exit(void) { }
> > -static inline void xe_configfs_check_device(struct pci_dev *pdev)
> > { }
> > -static inline bool xe_configfs_get_survivability_mode(struct
> > pci_dev *pdev) { return false; }
> > -static inline bool xe_configfs_primary_gt_allowed(struct pci_dev
> > *pdev) { return true; }
> > -static inline bool xe_configfs_media_gt_allowed(struct pci_dev
> > *pdev) { return true; }
> > -static inline u64 xe_configfs_get_engines_allowed(struct pci_dev
> > *pdev) { return U64_MAX; }
> > -static inline bool xe_configfs_get_psmi_enabled(struct pci_dev
> > *pdev) { return false; }
> > -static inline bool xe_configfs_get_enable_multi_queue(struct
> > pci_dev *pdev) { return true; }
> > -static inline bool
> > xe_configfs_get_disable_vram_page_offline(struct pci_dev *pdev) {
> > return false; }
> > -static inline ssize_t xe_configfs_get_ctx_restore_mid_bb(struct
> > pci_dev *pdev,
> > - enum
> > xe_engine_class class,
> > - u32 *cs,
> > size_t max_len) { return 0; }
> > -static inline ssize_t xe_configfs_get_ctx_restore_post_bb(struct
> > pci_dev *pdev,
> > - enum
> > xe_engine_class class,
> > - u32 *cs,
> > size_t max_len) { return 0; }
> > -#ifdef CONFIG_PCI_IOV
> > -static inline unsigned int xe_configfs_get_max_vfs(struct pci_dev
> > *pdev)
> > -{
> > - return xe_modparam.max_vfs;
> > -}
> > -static inline bool xe_configfs_admin_only_pf(struct pci_dev *pdev)
> > -{
> > - return XE_DEFAULT_ADMIN_ONLY_PF;
> > -}
> > -#endif
> > -#endif
> >
> > #endif
> > --
> > 2.43.0
> >
>
next prev parent reply other threads:[~2026-09-28 16:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 23:01 [PATCH 00/16] Add new debug infrastructure for configfs Stuart Summers
2026-09-24 23:01 ` [PATCH 01/16] drm/xe: Guard configfs attribute reads in getters Stuart Summers
2026-09-24 23:01 ` [PATCH 02/16] drm/xe/configfs: Fix out-of-bounds read in parse_wa_bb_lines() Stuart Summers
2026-09-24 23:01 ` [PATCH 03/16] drm/xe/configfs: Copy wa_bb out under the configfs lock Stuart Summers
2026-09-24 23:01 ` [PATCH 04/16] drm/xe: Require CONFIGFS_FS Stuart Summers
2026-09-25 23:16 ` Matt Roper
2026-09-28 16:46 ` Summers, Stuart [this message]
2026-09-24 23:01 ` [PATCH 05/16] drm/xe: Invert vram_page_offline configfs attribute Stuart Summers
2026-09-24 23:01 ` [PATCH 06/16] drm/xe: Make survivability_mode configfs attribute a bitmap Stuart Summers
2026-09-24 23:01 ` [PATCH 07/16] drm/xe: Sort xe_config_device fields Stuart Summers
2026-09-24 23:01 ` [PATCH 08/16] drm/xe: Split out configfs data structures Stuart Summers
2026-09-24 23:01 ` [PATCH 09/16] drm/xe: Add a new debug focused configfs group Stuart Summers
2026-09-24 23:01 ` [PATCH 10/16] drm/xe: Move debug configfs entries to xe_configfs_debug.c Stuart Summers
2026-09-24 23:01 ` [PATCH 11/16] drm/xe/guc: Add configfs support for guc_log_level Stuart Summers
2026-09-24 23:01 ` [PATCH 12/16] drm/xe/guc: Add support for NPK as a GuC log target Stuart Summers
2026-09-24 23:01 ` [PATCH 13/16] drm/xe: Add infrastructure for debug configfs parameters Stuart Summers
2026-09-24 23:01 ` [PATCH 14/16] drm/xe: Migrate existing debug configfs entries to params infrastructure Stuart Summers
2026-09-24 23:01 ` [PATCH 15/16] drm/xe: Taint kernel when debug configfs parameters are set Stuart Summers
2026-09-24 23:01 ` [PATCH 16/16] drm/xe: Add enable_media module parameter Stuart Summers
2026-09-24 23:08 ` ✗ CI.checkpatch: warning for Add new debug infrastructure for configfs (rev8) Patchwork
2026-09-24 23:10 ` ✓ CI.KUnit: success " Patchwork
2026-09-24 23:27 ` ✗ CI.checksparse: warning " Patchwork
2026-09-25 0:28 ` ✓ Xe.CI.BAT: success " Patchwork
2026-09-25 13:34 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-09-28 3:34 ` [PATCH 00/16] Add new debug infrastructure for configfs Matthew Brost
2026-09-28 17:07 ` Summers, Stuart
2026-09-28 19:20 ` Rodrigo Vivi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fefc463daa7401eff04fd28be098e9108d0f4980.camel@intel.com \
--to=stuart.summers@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.brost@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=shuicheng.lin@intel.com \
--cc=umesh.nerlige.ramappa@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox