From: Jesse Barnes Subject: [PATCH 2/5] drm/i915: add display power well report out to debugfs Date: Mon, 14 Oct 2013 16:07:46 -0700 Message-ID: <1381792069-27800-3-git-send-email-jbarnes@virtuousgeek.org> References: <1381792069-27800-1-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy7-pub.mail.unifiedlayer.com (oproxy7-pub.mail.unifiedlayer.com [67.222.55.9]) by gabe.freedesktop.org (Postfix) with SMTP id AED75E716C for ; Mon, 14 Oct 2013 16:07:54 -0700 (PDT) Received: from [67.161.37.189] (port=56824 helo=localhost.localdomain) by box514.bluehost.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.80) (envelope-from ) id 1VVrEw-0000hc-22 for intel-gfx@lists.freedesktop.org; Mon, 14 Oct 2013 17:07:54 -0600 In-Reply-To: <1381792069-27800-1-git-send-email-jbarnes@virtuousgeek.org> 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 List-Id: intel-gfx@lists.freedesktop.org For tracking current state. Signed-off-by: Jesse Barnes --- drivers/gpu/drm/i915/i915_debugfs.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 5fd6a5d..9f81e80 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -1727,6 +1727,18 @@ static int i915_pc8_status(struct seq_file *m, void *unused) return 0; } +static int i915_display_power_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; + bool enabled; + + enabled = intel_display_power_enabled(dev, POWER_DOMAIN_VGA); + seq_printf(m, "Display power on: %s\n", yesno(enabled)); + + return 0; +} + static int i915_wedged_get(void *data, u64 *val) { @@ -2234,6 +2246,7 @@ static struct drm_info_list i915_debugfs_list[] = { {"i915_edp_psr_status", i915_edp_psr_status, 0}, {"i915_energy_uJ", i915_energy_uJ, 0}, {"i915_pc8_status", i915_pc8_status, 0}, + {"i915_display_power_status", i915_display_power_status, 0}, }; #define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list) -- 1.8.3.1