From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915/ips: Make IPS debugfs per-crtc
Date: Mon, 27 Mar 2023 18:37:07 +0300 [thread overview]
Message-ID: <87ilem5hp8.fsf@intel.com> (raw)
In-Reply-To: <20230327133942.22063-1-ville.syrjala@linux.intel.com>
On Mon, 27 Mar 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> IPS is a per-pipe feature, so let's move the debugfs stuff
> under the crtc directory, and only register it when IPS
> is actually available.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Yay!
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/hsw_ips.c | 15 +++++++--------
> drivers/gpu/drm/i915/display/hsw_ips.h | 3 +--
> .../gpu/drm/i915/display/intel_display_debugfs.c | 2 +-
> 3 files changed, 9 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/hsw_ips.c b/drivers/gpu/drm/i915/display/hsw_ips.c
> index 2910f5d0f3e2..47209c858c32 100644
> --- a/drivers/gpu/drm/i915/display/hsw_ips.c
> +++ b/drivers/gpu/drm/i915/display/hsw_ips.c
> @@ -270,12 +270,10 @@ void hsw_ips_get_config(struct intel_crtc_state *crtc_state)
>
> static int hsw_ips_debugfs_status_show(struct seq_file *m, void *unused)
> {
> - struct drm_i915_private *i915 = m->private;
> + struct intel_crtc *crtc = m->private;
> + struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> intel_wakeref_t wakeref;
>
> - if (!HAS_IPS(i915))
> - return -ENODEV;
> -
> wakeref = intel_runtime_pm_get(&i915->runtime_pm);
>
> seq_printf(m, "Enabled by kernel parameter: %s\n",
> @@ -297,10 +295,11 @@ static int hsw_ips_debugfs_status_show(struct seq_file *m, void *unused)
>
> DEFINE_SHOW_ATTRIBUTE(hsw_ips_debugfs_status);
>
> -void hsw_ips_debugfs_register(struct drm_i915_private *i915)
> +void hsw_ips_crtc_debugfs_add(struct intel_crtc *crtc)
> {
> - struct drm_minor *minor = i915->drm.primary;
> + if (!hsw_crtc_supports_ips(crtc))
> + return;
>
> - debugfs_create_file("i915_ips_status", 0444, minor->debugfs_root,
> - i915, &hsw_ips_debugfs_status_fops);
> + debugfs_create_file("i915_ips_status", 0444, crtc->base.debugfs_entry,
> + crtc, &hsw_ips_debugfs_status_fops);
> }
> diff --git a/drivers/gpu/drm/i915/display/hsw_ips.h b/drivers/gpu/drm/i915/display/hsw_ips.h
> index 7ed6061874f7..4eb83b350791 100644
> --- a/drivers/gpu/drm/i915/display/hsw_ips.h
> +++ b/drivers/gpu/drm/i915/display/hsw_ips.h
> @@ -8,7 +8,6 @@
>
> #include <linux/types.h>
>
> -struct drm_i915_private;
> struct intel_atomic_state;
> struct intel_crtc;
> struct intel_crtc_state;
> @@ -23,6 +22,6 @@ bool hsw_crtc_state_ips_capable(const struct intel_crtc_state *crtc_state);
> int hsw_ips_compute_config(struct intel_atomic_state *state,
> struct intel_crtc *crtc);
> void hsw_ips_get_config(struct intel_crtc_state *crtc_state);
> -void hsw_ips_debugfs_register(struct drm_i915_private *i915);
> +void hsw_ips_crtc_debugfs_add(struct intel_crtc *crtc);
>
> #endif /* __HSW_IPS_H__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index cc5026272558..d5715ccc37f0 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -1092,7 +1092,6 @@ void intel_display_debugfs_register(struct drm_i915_private *i915)
> ARRAY_SIZE(intel_display_debugfs_list),
> minor->debugfs_root, minor);
>
> - hsw_ips_debugfs_register(i915);
> intel_dmc_debugfs_register(i915);
> intel_fbc_debugfs_register(i915);
> intel_hpd_debugfs_register(i915);
> @@ -1461,6 +1460,7 @@ void intel_crtc_debugfs_add(struct intel_crtc *crtc)
> crtc_updates_add(crtc);
> intel_drrs_crtc_debugfs_add(crtc);
> intel_fbc_crtc_debugfs_add(crtc);
> + hsw_ips_crtc_debugfs_add(crtc);
>
> debugfs_create_file("i915_current_bpc", 0444, root, crtc,
> &i915_current_bpc_fops);
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-03-27 15:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 13:39 [Intel-gfx] [PATCH 1/2] drm/i915/ips: Make IPS debugfs per-crtc Ville Syrjala
2023-03-27 13:39 ` [Intel-gfx] [PATCH 2/2] drm/i915/ips: Add i915_ips_false_color debugfs file Ville Syrjala
2023-03-27 15:37 ` Jani Nikula
2023-03-27 15:37 ` Jani Nikula [this message]
2023-03-27 21:15 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/2] drm/i915/ips: Make IPS debugfs per-crtc Patchwork
2023-03-27 21:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-03-28 4:14 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=87ilem5hp8.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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