From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915/uncore: abstract intel_uncore_fw_domains_show()
Date: Tue, 24 Nov 2026 21:56:52 +0200 [thread overview]
Message-ID: <awXsBCkjmpoFGKBS@intel.com> (raw)
In-Reply-To: <20261124181405.1669126-1-jani.nikula@intel.com>
On Tue, Nov 24, 2026 at 08:14:04PM +0200, Jani Nikula wrote:
> The debugfs shouldn't really have to know about uncore implementation
> details. Add a separate function to log the forcewake domains.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 14 +-------------
> drivers/gpu/drm/i915/intel_uncore.c | 18 ++++++++++++++++++
> drivers/gpu/drm/i915/intel_uncore.h | 2 ++
> 3 files changed, 21 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c b/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
> index adf2512e2ed5..1b39e5f19192 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
> @@ -70,20 +70,8 @@ static int fw_domains_show(struct seq_file *m, void *data)
> {
> struct intel_gt *gt = m->private;
> struct intel_uncore *uncore = gt->uncore;
> - struct intel_uncore_forcewake_domain *fw_domain;
> - unsigned int tmp;
>
> - spin_lock_irq(&uncore->lock);
> -
> - seq_printf(m, "user.bypass_count = %u\n",
> - uncore->user_forcewake_count);
> -
> - for_each_fw_domain(fw_domain, uncore, tmp)
> - seq_printf(m, "%s.wake_count = %u\n",
> - intel_uncore_forcewake_domain_to_str(fw_domain->id),
> - READ_ONCE(fw_domain->wake_count));
> -
> - spin_unlock_irq(&uncore->lock);
> + intel_uncore_fw_domains_show(m, uncore);
>
> return 0;
> }
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 4e10a02f5750..02f6000b203e 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -2691,6 +2691,24 @@ intel_uncore_forcewake_for_reg(struct intel_uncore *uncore,
> return fw_domains;
> }
>
> +void intel_uncore_fw_domains_show(struct seq_file *m, struct intel_uncore *uncore)
> +{
> + struct intel_uncore_forcewake_domain *fw_domain;
> + unsigned int tmp;
> +
> + spin_lock_irq(&uncore->lock);
> +
> + seq_printf(m, "user.bypass_count = %u\n",
> + uncore->user_forcewake_count);
> +
> + for_each_fw_domain(fw_domain, uncore, tmp)
> + seq_printf(m, "%s.wake_count = %u\n",
> + intel_uncore_forcewake_domain_to_str(fw_domain->id),
> + READ_ONCE(fw_domain->wake_count));
> +
> + spin_unlock_irq(&uncore->lock);
> +}
> +
> #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
> #include "selftests/mock_uncore.c"
> #include "selftests/intel_uncore.c"
> diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h
> index 9047d7d4d855..d5de6a172ff3 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.h
> +++ b/drivers/gpu/drm/i915/intel_uncore.h
> @@ -470,6 +470,8 @@ static inline void __iomem *intel_uncore_regs(struct intel_uncore *uncore)
> return uncore->regs;
> }
>
> +void intel_uncore_fw_domains_show(struct seq_file *m, struct intel_uncore *uncore);
> +
> struct intel_uncore *to_intel_uncore(struct drm_device *drm);
>
> /*
> --
> 2.47.3
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-11-24 19:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 18:14 [PATCH 1/2] drm/i915/uncore: abstract intel_uncore_fw_domains_show() Jani Nikula
2026-11-24 18:14 ` [PATCH 2/2] drm/i915/uncore: hide uncore forcewake iterators Jani Nikula
2026-11-24 19:59 ` Ville Syrjälä
2026-11-25 9:12 ` Jani Nikula
2026-11-25 13:59 ` Ville Syrjälä
2026-11-26 8:19 ` Jani Nikula
2026-11-24 19:56 ` Ville Syrjälä [this message]
2026-11-25 5:29 ` ✓ i915.CI.BAT: success for series starting with [1/2] drm/i915/uncore: abstract intel_uncore_fw_domains_show() Patchwork
2026-11-25 5:30 ` Patchwork
2026-11-25 5:31 ` Patchwork
2026-11-25 5:32 ` Patchwork
2026-11-26 1:22 ` ✓ i915.CI.Full: " 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=awXsBCkjmpoFGKBS@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@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