From: Jani Nikula <jani.nikula@intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/1] drm/i915/debugfs: New debugfs for display clock frequencies
Date: Wed, 12 Apr 2023 12:22:51 +0300 [thread overview]
Message-ID: <87ttxlcv4k.fsf@intel.com> (raw)
In-Reply-To: <20230412090911.811254-2-bhanuprakash.modem@intel.com>
On Wed, 12 Apr 2023, Bhanuprakash Modem <bhanuprakash.modem@intel.com> wrote:
> Instead of mixing display & non-display stuff together, move
> display specific clock info to new debugfs. This patch will
> move Current & Max cdclk and Max pixel clock frequency info
> to the new debugfs file "i915_display_clock_info".
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
> .../gpu/drm/i915/display/intel_display_debugfs.c | 16 ++++++++++++++++
> drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 4 ----
> 2 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 45113ae107ba..8e725d0c79d1 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -800,6 +800,21 @@ static int i915_dp_mst_info(struct seq_file *m, void *unused)
> return 0;
> }
>
> +static int i915_display_clock_info(struct seq_file *m, void *unused)
> +{
> + struct drm_i915_private *i915 = node_to_i915(m->private);
> +
> + drm_modeset_lock_all(&i915->drm);
> +
> + seq_printf(m, "Current CD clock frequency: %d kHz\n", i915->display.cdclk.hw.cdclk);
> + seq_printf(m, "Max CD clock frequency: %d kHz\n", i915->display.cdclk.max_cdclk_freq);
> + seq_printf(m, "Max pixel clock frequency: %d kHz\n", i915->max_dotclk_freq);
> +
> + drm_modeset_unlock_all(&i915->drm);
> +
> + return 0;
> +}
This is all cdclk related, so we should probably put these to
intel_cdclk.c. See intel_dmc_debugfs_register() and how it's called, for
reference.
> +
> static ssize_t i915_displayport_test_active_write(struct file *file,
> const char __user *ubuf,
> size_t len, loff_t *offp)
> @@ -1065,6 +1080,7 @@ static const struct drm_info_list intel_display_debugfs_list[] = {
> {"i915_dp_mst_info", i915_dp_mst_info, 0},
> {"i915_ddb_info", i915_ddb_info, 0},
> {"i915_lpsp_status", i915_lpsp_status, 0},
> + {"i915_disply_clock_info", i915_display_clock_info, 0},
Maybe "i915_cdclk_info"? (Also, disply has a typo there.)
> };
>
> static const struct {
> 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 80dbbef86b1d..8814ce238cc5 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c
> @@ -393,10 +393,6 @@ void intel_gt_pm_frequency_dump(struct intel_gt *gt, struct drm_printer *p)
> drm_puts(p, "no P-state info available\n");
> }
>
> - drm_printf(p, "Current CD clock frequency: %d kHz\n", i915->display.cdclk.hw.cdclk);
> - drm_printf(p, "Max CD clock frequency: %d kHz\n", i915->display.cdclk.max_cdclk_freq);
> - drm_printf(p, "Max pixel clock frequency: %d kHz\n", i915->max_dotclk_freq);
> -
Maybe leave these in for now, doesn't hurt anyone, can be removed in a
separate patch later.
BR,
Jani.
> intel_runtime_pm_put(uncore->rpm, wakeref);
> }
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-04-12 9:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 9:09 [Intel-gfx] [PATCH 0/1] drm/i915/debugfs: New debugfs for display clock frequencies Bhanuprakash Modem
2023-04-12 9:09 ` [Intel-gfx] [PATCH 1/1] " Bhanuprakash Modem
2023-04-12 9:22 ` Jani Nikula [this message]
2023-04-12 10:49 ` Modem, Bhanuprakash
2023-04-14 15:51 ` Lucas De Marchi
2023-04-18 9:15 ` Jani Nikula
2023-04-12 12:19 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-12 20:07 ` [Intel-gfx] ✗ Fi.CI.IGT: 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=87ttxlcv4k.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=bhanuprakash.modem@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.