Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: intel-gfx@lists.freedesktop.org
Cc: Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH 2/3] drm/i915: extract intel_enable_rc6()
Date: Sun, 25 Mar 2012 17:33:28 -0700	[thread overview]
Message-ID: <1332722012-4853-2-git-send-email-ben@bwidawsk.net> (raw)
In-Reply-To: <1332722012-4853-1-git-send-email-ben@bwidawsk.net>

This function tells us the state of RC6. In the future perhaps it will
even give something like a mask back telling which RC6 types are
enabled.

In order to return sane values to userspace for an upcoming RC6 sysfs
interface (since register behavior seems to be somewhat random), we will
query this value, and therefore it needs to be available to the rest of
the driver.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_drv.h      |    1 +
 drivers/gpu/drm/i915/intel_display.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index bbbc1a4..22ab4db 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1414,6 +1414,7 @@ extern void ironlake_enable_rc6(struct drm_device *dev);
 extern void gen6_set_rps(struct drm_device *dev, u8 val);
 extern void intel_detect_pch(struct drm_device *dev);
 extern int intel_trans_dp_port_sel(struct drm_crtc *crtc);
+extern int intel_enable_rc6(const struct drm_device *dev);
 
 extern void __gen6_gt_force_wake_get(struct drm_i915_private *dev_priv);
 extern void __gen6_gt_force_wake_mt_get(struct drm_i915_private *dev_priv);
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ab62c96..efbf709 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8235,7 +8235,7 @@ void intel_init_emon(struct drm_device *dev)
 	dev_priv->corr = (lcfuse & LCFUSE_HIV_MASK);
 }
 
-static int intel_enable_rc6(struct drm_device *dev)
+int intel_enable_rc6(const struct drm_device *dev)
 {
 	/*
 	 * Respect the kernel parameter if it is set
-- 
1.7.9.4

  reply	other threads:[~2012-03-26  0:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26  0:33 [PATCH v2 1/3] drm/i915: add rc6 residency times to debugfs Ben Widawsky
2012-03-26  0:33 ` Ben Widawsky [this message]
2012-03-26  9:32   ` [PATCH 2/3] drm/i915: extract intel_enable_rc6() Daniel Vetter
2012-03-26  0:33 ` [PATCH v2 3/3] drm/i915: rc6 in sysfs Ben Widawsky
2012-03-26  0:33 ` [PATCH 1/3] build: make sure we have asprintf Ben Widawsky
2012-03-26  0:33 ` [PATCH 2/3] drm/i915: extract card getting Ben Widawsky
2012-03-26  9:33   ` Daniel Vetter
2012-03-26  0:33 ` [PATCH v2 3/3] tests: rc6 residency test Ben Widawsky
2012-03-26  9:37   ` Daniel Vetter
2012-03-26  9:40     ` Daniel Vetter
2012-03-26 21:54       ` Ben Widawsky
2012-03-27  7:22         ` Daniel Vetter
2012-03-27  8:34   ` Daniel Vetter
2012-03-26  9:34 ` [PATCH v2 1/3] drm/i915: add rc6 residency times to debugfs Daniel Vetter
2012-03-26 12:33   ` Eugeni Dodonov
2012-03-26 16:49     ` Ben Widawsky
2012-03-26 22:34     ` Ben Widawsky
2012-03-26 23:04       ` Eugeni Dodonov
  -- strict thread matches above, loose matches on Subject: below --
2012-03-25  2:09 [PATCH " Ben Widawsky
2012-03-25  2:09 ` [PATCH 2/3] drm/i915: extract intel_enable_rc6() Ben Widawsky
2012-03-25 12:10   ` Daniel Vetter
2012-03-29  0:30     ` Ben Widawsky

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=1332722012-4853-2-git-send-email-ben@bwidawsk.net \
    --to=ben@bwidawsk.net \
    --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