From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paulo Zanoni Subject: [PATCH 7/8] drm/i915: add i915_pc8_status debugfs file Date: Mon, 29 Jul 2013 17:48:26 -0300 Message-ID: <1375130907-4054-8-git-send-email-przanoni@gmail.com> References: <1375130907-4054-1-git-send-email-przanoni@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-gh0-f172.google.com (mail-gh0-f172.google.com [209.85.160.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 2765AE6253 for ; Mon, 29 Jul 2013 13:49:01 -0700 (PDT) Received: by mail-gh0-f172.google.com with SMTP id r18so1901088ghr.3 for ; Mon, 29 Jul 2013 13:49:00 -0700 (PDT) In-Reply-To: <1375130907-4054-1-git-send-email-przanoni@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org Cc: Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org From: Paulo Zanoni For now it just prints the value of the forbid_refcount and allowing variables. Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/i915_debugfs.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index ed72fe0..320f4c2 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1674,6 +1674,26 @@ static int i915_edp_psr_status(struct seq_file *m, void *data) return 0; } +static int i915_pc8_status(struct seq_file *m, void *unused) +{ + struct drm_info_node *node = (struct drm_info_node *) m->private; + struct drm_device *dev = node->minor->dev; + struct drm_i915_private *dev_priv = dev->dev_private; + + if (!IS_HASWELL(dev)) { + seq_puts(m, "not supported\n"); + return 0; + } + + mutex_lock(&dev_priv->pc8.lock); + seq_printf(m, "Core display allowing: %s\n", + yesno(dev_priv->pc8.allowing)); + seq_printf(m, "Forbid refcount: %d\n", dev_priv->pc8.forbid_refcnt); + mutex_unlock(&dev_priv->pc8.lock); + + return 0; +} + static int i915_wedged_get(void *data, u64 *val) { @@ -2107,6 +2127,7 @@ static struct drm_info_list i915_debugfs_list[] = { {"i915_dpio", i915_dpio_info, 0}, {"i915_llc", i915_llc, 0}, {"i915_edp_psr_status", i915_edp_psr_status, 0}, + {"i915_pc8_status", i915_pc8_status, 0}, }; #define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list) -- 1.8.1.2