Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "Anoop, Vijay" <anoop.c.vijay@intel.com>
Cc: <intel-xe@lists.freedesktop.org>,
	<umesh.nerlige.ramappa@intel.com>, <badal.nilawar@intel.com>,
	<aravind.iddamsetty@intel.com>, <riana.tauro@intel.com>,
	<anshuman.gupta@intel.com>, <matthew.d.roper@intel.com>,
	<michael.j.ruhl@intel.com>, <paul.e.luse@intel.com>,
	<mohamed.mansoor.v@intel.com>, <kam.nasim@intel.com>
Subject: Re: [PATCH v3 2/4] drm/xe/sysctrl: Add sysctrl debugfs infrastructure
Date: Fri, 7 Aug 2026 14:53:54 -0400	[thread overview]
Message-ID: <anYpwtF4LHYpxUYV@intel.com> (raw)
In-Reply-To: <20260807145621.2938848-8-anoop.c.vijay@intel.com>

On Fri, Aug 07, 2026 at 07:56:23AM -0700, Anoop, Vijay wrote:
> From: Anoop Vijay <anoop.c.vijay@intel.com>
> 
> Add basic debugfs support for sysctrl. This patch adds necessary
> types and registration hooks.
> 
> Changes:
> - Add debugfs structure to xe_sysctrl_types.h
> - Add xe_sysctrl_debugfs.h header
> - Add xe_sysctrl_debugfs_register() stub
> - Wire up sysctrl debugfs registration
> 
> No functional changes, debugfs directory created but empty.

I know that we all keep asking smaller patches that are easier
to review. But as everything in life, we need to find the good
balance. In this case I believe it would be good if this was
squashed with the patch 3...

(more below)

> 
> Signed-off-by: Anoop Vijay <anoop.c.vijay@intel.com>
> ---
>  drivers/gpu/drm/xe/Makefile             |  1 +
>  drivers/gpu/drm/xe/xe_debugfs.c         |  5 +++++
>  drivers/gpu/drm/xe/xe_sysctrl_debugfs.c | 27 +++++++++++++++++++++++++
>  drivers/gpu/drm/xe/xe_sysctrl_debugfs.h | 14 +++++++++++++
>  drivers/gpu/drm/xe/xe_sysctrl_types.h   |  7 +++++++
>  5 files changed, 54 insertions(+)
>  create mode 100644 drivers/gpu/drm/xe/xe_sysctrl_debugfs.c
>  create mode 100644 drivers/gpu/drm/xe/xe_sysctrl_debugfs.h
> 
> diff --git a/drivers/gpu/drm/xe/Makefile b/drivers/gpu/drm/xe/Makefile
> index 44ed055439d4..f083451608ff 100644
> --- a/drivers/gpu/drm/xe/Makefile
> +++ b/drivers/gpu/drm/xe/Makefile
> @@ -127,6 +127,7 @@ xe-y += xe_bb.o \
>  	xe_survivability_mode.o \
>  	xe_sync.o \
>  	xe_sysctrl.o \
> +	xe_sysctrl_debugfs.o \
>  	xe_sysctrl_event.o \
>  	xe_sysctrl_mailbox.o \
>  	xe_tile.o \
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
> index 8de78cd0aa03..666290d83bfe 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_debugfs.c
> @@ -30,6 +30,8 @@
>  #include "xe_sriov_pf_debugfs.h"
>  #include "xe_sriov_vf.h"
>  #include "xe_step.h"
> +#include "xe_sysctrl.h"
> +#include "xe_sysctrl_debugfs.h"
>  #include "xe_tile_debugfs.h"
>  #include "xe_vsec.h"
>  #include "xe_wa.h"
> @@ -770,6 +772,9 @@ void xe_debugfs_register(struct xe_device *xe)
>  
>  	xe_fault_inject_debugfs_register(xe, root);
>  
> +	if (xe->info.has_sysctrl)
> +		xe_sysctrl_debugfs_register(&xe->sc, root);

Here is where you put the check if the fw is loaded... ideally...

> +
>  	if (IS_SRIOV_PF(xe))
>  		xe_sriov_pf_debugfs_register(xe, root);
>  	else if (IS_SRIOV_VF(xe))
> diff --git a/drivers/gpu/drm/xe/xe_sysctrl_debugfs.c b/drivers/gpu/drm/xe/xe_sysctrl_debugfs.c
> new file mode 100644
> index 000000000000..0238ff093831
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/xe_sysctrl_debugfs.c
> @@ -0,0 +1,27 @@
> +// SPDX-License-Identifier: MIT
> +/*
> + * Copyright © 2026 Intel Corporation
> + */
> +
> +#include <linux/debugfs.h>
> +
> +#include "xe_device.h"
> +#include "xe_sysctrl.h"
> +#include "xe_sysctrl_debugfs.h"
> +#include "xe_sysctrl_types.h"
> +
> +/**
> + * xe_sysctrl_debugfs_register - Register debugfs entries for System Controller
> + * @sc: xe_sysctrl instance
> + * @parent: parent debugfs directory
> + */
> +void xe_sysctrl_debugfs_register(struct xe_sysctrl *sc, struct dentry *parent)
> +{
> +	struct dentry *root;
> +
> +	root = debugfs_create_dir("sc", parent);
> +	if (IS_ERR(root))
> +		return;
> +
> +	sc->debugfs.root = root;
> +}
> diff --git a/drivers/gpu/drm/xe/xe_sysctrl_debugfs.h b/drivers/gpu/drm/xe/xe_sysctrl_debugfs.h
> new file mode 100644
> index 000000000000..d1414ac3562e
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/xe_sysctrl_debugfs.h
> @@ -0,0 +1,14 @@
> +/* SPDX-License-Identifier: MIT */
> +/*
> + * Copyright © 2026 Intel Corporation
> + */
> +
> +#ifndef _XE_SYSCTRL_DEBUGFS_H_
> +#define _XE_SYSCTRL_DEBUGFS_H_
> +
> +struct dentry;
> +struct xe_sysctrl;
> +
> +void xe_sysctrl_debugfs_register(struct xe_sysctrl *sc, struct dentry *parent);
> +
> +#endif
> diff --git a/drivers/gpu/drm/xe/xe_sysctrl_types.h b/drivers/gpu/drm/xe/xe_sysctrl_types.h
> index 66ba24f43017..d50a35fefb7a 100644
> --- a/drivers/gpu/drm/xe/xe_sysctrl_types.h
> +++ b/drivers/gpu/drm/xe/xe_sysctrl_types.h
> @@ -11,6 +11,7 @@
>  #include <linux/workqueue_types.h>
>  
>  struct xe_mmio;
> +struct dentry;
>  
>  /**
>   * struct xe_sysctrl - System Controller driver context
> @@ -34,6 +35,12 @@ struct xe_sysctrl {
>  
>  	/** @event_lock: Mutex protecting pending events */
>  	struct mutex event_lock;
> +
> +	/** @debugfs: Debugfs entries */
> +	struct {
> +		/** @debugfs.root: Root debugfs directory */
> +		struct dentry *root;
> +	} debugfs;
>  };
>  
>  #endif
> -- 
> 2.43.0
> 

  reply	other threads:[~2026-08-07 18:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-07 14:56 [PATCH v3 0/4] drm/xe/sysctrl: Add System Controller debugfs Anoop, Vijay
2026-08-07 14:56 ` [PATCH v3 1/4] drm/xe/sysctrl: Add System Controller get application status Anoop, Vijay
2026-08-07 18:51   ` Rodrigo Vivi
2026-08-07 14:56 ` [PATCH v3 2/4] drm/xe/sysctrl: Add sysctrl debugfs infrastructure Anoop, Vijay
2026-08-07 18:53   ` Rodrigo Vivi [this message]
2026-08-07 14:56 ` [PATCH v3 3/4] drm/xe/sysctrl: Add loopback test debugfs interface Anoop, Vijay
2026-08-07 14:56 ` [PATCH v3 4/4] drm/xe/sysctrl: Add RAS error injection " Anoop, Vijay
2026-08-07 15:15   ` Gupta, Anshuman
2026-08-07 18:49     ` Rodrigo Vivi
2026-08-07 15:02 ` ✗ CI.checkpatch: warning for drm/xe/sysctrl: Add System Controller debugfs (rev3) Patchwork
2026-08-07 15:03 ` ✓ CI.KUnit: success " Patchwork
2026-08-07 16:05 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-08  0:43 ` ✗ Xe.CI.FULL: failure " Patchwork

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=anYpwtF4LHYpxUYV@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=anoop.c.vijay@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=aravind.iddamsetty@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=kam.nasim@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=michael.j.ruhl@intel.com \
    --cc=mohamed.mansoor.v@intel.com \
    --cc=paul.e.luse@intel.com \
    --cc=riana.tauro@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