From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Show PCI power state under debugfs/i915_runtime_pm_status
Date: Wed, 30 Mar 2016 20:55:51 +0200 [thread overview]
Message-ID: <20160330185551.GR2510@phenom.ffwll.local> (raw)
In-Reply-To: <1459347521-31558-2-git-send-email-chris@chris-wilson.co.uk>
On Wed, Mar 30, 2016 at 03:18:41PM +0100, Chris Wilson wrote:
> As the current PCI power state is an essential feature of runtime pm,
> include it in the debugfs/i915_runtime_pm_status.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index adabbb47a8aa..05d701122259 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2695,10 +2695,8 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused)
> struct drm_device *dev = node->minor->dev;
> struct drm_i915_private *dev_priv = dev->dev_private;
>
> - if (!HAS_RUNTIME_PM(dev)) {
> - seq_puts(m, "not supported\n");
> - return 0;
> - }
> + if (!HAS_RUNTIME_PM(dev_priv))
> + seq_puts(m, "Runtime power management not supported\n");
>
> seq_printf(m, "GPU idle: %s\n", yesno(!dev_priv->mm.busy));
> seq_printf(m, "IRQs disabled: %s\n",
> @@ -2709,6 +2707,9 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused)
> #else
> seq_printf(m, "Device Power Management (CONFIG_PM) disabled\n");
> #endif
> + seq_printf(m, "PCI device power state: %s [%d]\n",
> + pci_power_names[dev_priv->dev->pdev->current_state],
Please use pci_power_name() instead (you are missing a + 1), and I don't
think we need the raw value. With that addressed:
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> + dev_priv->dev->pdev->current_state);
>
> return 0;
> }
> --
> 2.8.0.rc3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-03-30 18:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-30 14:18 [PATCH 1/2] drm/i915: Add struct_mutex locking for debugs/i915_gem_framebuffer Chris Wilson
2016-03-30 14:18 ` [PATCH 2/2] drm/i915: Show PCI power state under debugfs/i915_runtime_pm_status Chris Wilson
2016-03-30 18:55 ` Daniel Vetter [this message]
2016-03-30 19:05 ` Chris Wilson
2016-03-30 18:50 ` [PATCH 1/2] drm/i915: Add struct_mutex locking for debugs/i915_gem_framebuffer Daniel Vetter
2016-03-31 13:17 ` ✓ Fi.CI.BAT: success for series starting with [1/2] " 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=20160330185551.GR2510@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=chris@chris-wilson.co.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox