Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
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>,
	"Wajdeczko, Michal" <michal.wajdeczko@intel.com>,
	"Lin, Shuicheng" <shuicheng.lin@intel.com>
Subject: Re: [PATCH 03/10] drm/xe: Split out configfs data structures
Date: Mon, 24 Aug 2026 20:18:21 +0000	[thread overview]
Message-ID: <2d6bfbbf82eaaa08aa3bcf04e252f81d12ef7559.camel@intel.com> (raw)
In-Reply-To: <20260821211648.GF681121@mdroper-desk1.amr.corp.intel.com>

On Fri, 2026-08-21 at 14:16 -0700, Matt Roper wrote:
> On Thu, Aug 20, 2026 at 09:06:42PM +0000, Stuart Summers wrote:
> > Planning on moving debug specific configfs parameters
> > to their own file in a future patch. In preparation for
> > that change, move the structures in xe_configfs.c to a
> > new _types.h file so we can easily access them in the
> > different configfs files.
> > 
> > Doing that separately here instead of combining with
> > the patch that adds the debug file for ease of review.
> > 
> > Signed-off-by: Stuart Summers <stuart.summers@intel.com>
> > Assisted-by: Copilot:claude-sonnet-4.6,claude-opus-4.7
> 
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

Thanks for the review!

> 
> > ---
> >  drivers/gpu/drm/xe/xe_configfs.c       | 41 --------------------
> >  drivers/gpu/drm/xe/xe_configfs.h       |  2 +-
> >  drivers/gpu/drm/xe/xe_configfs_types.h | 53
> > ++++++++++++++++++++++++++
> >  3 files changed, 54 insertions(+), 42 deletions(-)
> >  create mode 100644 drivers/gpu/drm/xe/xe_configfs_types.h
> > 
> > diff --git a/drivers/gpu/drm/xe/xe_configfs.c
> > b/drivers/gpu/drm/xe/xe_configfs.c
> > index cb6ab1fcb8c1..029c9f682c8e 100644
> > --- a/drivers/gpu/drm/xe/xe_configfs.c
> > +++ b/drivers/gpu/drm/xe/xe_configfs.c
> > @@ -4,7 +4,6 @@
> >   */
> >  
> >  #include <linux/bitops.h>
> > -#include <linux/ctype.h>
> >  #include <linux/configfs.h>
> >  #include <linux/cleanup.h>
> >  #include <linux/find.h>
> > @@ -17,10 +16,7 @@
> >  #include "xe_configfs.h"
> >  #include "xe_defaults.h"
> >  #include "xe_gt_types.h"
> > -#include "xe_hw_engine_types.h"
> >  #include "xe_module.h"
> > -#include "xe_pci_types.h"
> > -#include "xe_sriov_types.h"
> >  
> >  /**
> >   * DOC: Xe Configfs
> > @@ -259,43 +255,6 @@
> >   *     # rmdir /sys/kernel/config/xe/0000:03:00.0/
> >   */
> >  
> > -/* Similar to struct xe_bb, but not tied to HW (yet) */
> > -struct wa_bb {
> > -       u32 *cs;
> > -       u32 len; /* in dwords */
> > -};
> > -
> > -struct xe_config_group_device {
> > -       struct config_group group;
> > -       struct config_group sriov;
> > -
> > -       /*
> > -        * Fields sorted by type (largest first) then name: struct
> > arrays,
> > -        * u64, u32/unsigned int, u8, bool, sub-structs last.
> > Within each
> > -        * type, entries are sorted alphabetically.
> > -        */
> > -       struct xe_config_device {
> > -               struct wa_bb
> > ctx_restore_mid_bb[XE_ENGINE_CLASS_MAX];
> > -               struct wa_bb
> > ctx_restore_post_bb[XE_ENGINE_CLASS_MAX];
> > -               u64 engines_allowed;
> > -               u64 gt_types_allowed;
> > -               bool enable_multi_queue;
> > -               bool enable_psmi;
> > -               bool survivability_mode;
> > -               struct {
> > -                       unsigned int max_vfs;
> > -                       bool admin_only_pf;
> > -               } sriov;
> > -       } config;
> > -
> > -       /* protects attributes */
> > -       struct mutex lock;
> > -       /* matching descriptor */
> > -       const struct xe_device_desc *desc;
> > -       /* tentative SR-IOV mode */
> > -       enum xe_sriov_mode mode;
> > -};
> > -
> >  static const struct xe_config_device device_defaults = {
> >         .engines_allowed = U64_MAX,
> >         .gt_types_allowed = U64_MAX,
> > diff --git a/drivers/gpu/drm/xe/xe_configfs.h
> > b/drivers/gpu/drm/xe/xe_configfs.h
> > index bba592fb612c..7db2f46291fa 100644
> > --- a/drivers/gpu/drm/xe/xe_configfs.h
> > +++ b/drivers/gpu/drm/xe/xe_configfs.h
> > @@ -8,8 +8,8 @@
> >  #include <linux/limits.h>
> >  #include <linux/types.h>
> >  
> > +#include "xe_configfs_types.h"
> >  #include "xe_defaults.h"
> > -#include "xe_hw_engine_types.h"
> >  #include "xe_module.h"
> >  
> >  struct pci_dev;
> > diff --git a/drivers/gpu/drm/xe/xe_configfs_types.h
> > b/drivers/gpu/drm/xe/xe_configfs_types.h
> > new file mode 100644
> > index 000000000000..3be7d6160b4c
> > --- /dev/null
> > +++ b/drivers/gpu/drm/xe/xe_configfs_types.h
> > @@ -0,0 +1,53 @@
> > +/* SPDX-License-Identifier: MIT */
> > +/*
> > + * Copyright © 2026 Intel Corporation
> > + */
> > +#ifndef _XE_CONFIGFS_TYPES_H_
> > +#define _XE_CONFIGFS_TYPES_H_
> > +
> > +#include <linux/configfs.h>
> > +#include <linux/mutex.h>
> > +#include <linux/types.h>
> > +
> > +#include "xe_hw_engine_types.h"
> > +#include "xe_pci_types.h"
> > +#include "xe_sriov_types.h"
> > +
> > +/* Similar to struct xe_bb, but not tied to HW (yet) */
> > +struct wa_bb {
> > +       u32 *cs;
> > +       u32 len; /* in dwords */
> > +};
> > +
> > +struct xe_config_group_device {
> > +       struct config_group group;
> > +       struct config_group sriov;
> > +
> > +       /*
> > +        * Fields sorted by type (largest first) then name: struct
> > arrays,
> > +        * u64, u32/unsigned int, u8, bool, sub-structs last.
> > Within each
> > +        * type, entries are sorted alphabetically.
> > +        */
> > +       struct xe_config_device {
> > +               struct wa_bb
> > ctx_restore_mid_bb[XE_ENGINE_CLASS_MAX];
> > +               struct wa_bb
> > ctx_restore_post_bb[XE_ENGINE_CLASS_MAX];
> > +               u64 engines_allowed;
> > +               u64 gt_types_allowed;
> > +               bool enable_multi_queue;
> > +               bool enable_psmi;
> > +               bool survivability_mode;
> > +               struct {
> > +                       unsigned int max_vfs;
> > +                       bool admin_only_pf;
> > +               } sriov;
> > +       } config;
> > +
> > +       /* protects attributes */
> > +       struct mutex lock;
> > +       /* matching descriptor */
> > +       const struct xe_device_desc *desc;
> > +       /* tentative SR-IOV mode */
> > +       enum xe_sriov_mode mode;
> > +};
> > +
> > +#endif /* _XE_CONFIGFS_TYPES_H_ */
> > -- 
> > 2.43.0
> > 
> 


  reply	other threads:[~2026-08-24 20:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 21:06 [PATCH 00/10] Add new debug infrastructure for configfs Stuart Summers
2026-08-20 21:06 ` [PATCH 01/10] drm/xe: Guard configfs attribute reads in getters Stuart Summers
2026-08-20 21:24   ` sashiko-bot
2026-08-21 20:42   ` Matt Roper
2026-08-24 14:45     ` Summers, Stuart
2026-08-20 21:06 ` [PATCH 02/10] drm/xe: Sort xe_config_device fields Stuart Summers
2026-08-20 21:24   ` sashiko-bot
2026-08-21 21:06   ` Matt Roper
2026-08-24 16:52     ` Summers, Stuart
2026-08-20 21:06 ` [PATCH 03/10] drm/xe: Split out configfs data structures Stuart Summers
2026-08-21 21:16   ` Matt Roper
2026-08-24 20:18     ` Summers, Stuart [this message]
2026-08-20 21:06 ` [PATCH 04/10] drm/xe: Add a new debug focused configfs group Stuart Summers
2026-08-21 22:08   ` Matt Roper
2026-08-23 21:22     ` Michal Wajdeczko
2026-08-24 20:18       ` Summers, Stuart
2026-08-20 21:06 ` [PATCH 05/10] drm/xe: Move debug configfs entries to xe_configfs_debug.c Stuart Summers
2026-08-20 21:28   ` sashiko-bot
2026-08-21 22:18   ` Matt Roper
2026-08-24 20:28     ` Summers, Stuart
2026-08-26 21:20       ` Rodrigo Vivi
2026-08-20 21:06 ` [PATCH 06/10] drm/xe/guc: Add configfs support for guc_log_level Stuart Summers
2026-08-20 21:06 ` [PATCH 07/10] drm/xe/guc: Add support for NPK as a GuC log target Stuart Summers
2026-08-20 21:06 ` [PATCH 08/10] drm/xe: Add infrastructure for debug configfs parameters Stuart Summers
2026-08-20 21:06 ` [PATCH 09/10] drm/xe: Migrate existing debug configfs entries to params infrastructure Stuart Summers
2026-08-20 21:06 ` [PATCH 10/10] drm/xe: Taint kernel when debug configfs parameters are set Stuart Summers
2026-08-20 21:24   ` sashiko-bot
2026-08-20 22:12 ` ✗ CI.checkpatch: warning for Add new debug infrastructure for configfs (rev7) Patchwork
2026-08-20 22:13 ` ✓ CI.KUnit: success " Patchwork
2026-08-20 22:52 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-21  1:28 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-08-21 19:27 ` [PATCH 00/10] Add new debug infrastructure for configfs Summers, Stuart
  -- strict thread matches above, loose matches on Subject: below --
2026-08-20 20:07 Stuart Summers
2026-08-20 20:07 ` [PATCH 03/10] drm/xe: Split out configfs data structures Stuart Summers
2026-08-07 19:45 [PATCH 00/10] Add new debug infrastructure for configfs Stuart Summers
2026-08-07 19:45 ` [PATCH 03/10] drm/xe: Split out configfs data structures Stuart Summers
2026-08-05 23:20 [PATCH 00/10] Add new debug infrastructure for configfs Stuart Summers
2026-08-05 23:20 ` [PATCH 03/10] drm/xe: Split out configfs data structures Stuart Summers

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=2d6bfbbf82eaaa08aa3bcf04e252f81d12ef7559.camel@intel.com \
    --to=stuart.summers@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=michal.wajdeczko@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