From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 1/6] drm/i915: grab force_wake when restoring LCPLL
Date: Mon, 19 Aug 2013 16:01:13 -0300 [thread overview]
Message-ID: <1376938873-3692-1-git-send-email-przanoni@gmail.com> (raw)
In-Reply-To: <20130819182541.GC7784@nuc-i3427.alporthouse.com>
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
If LCPLL is disabled, there's a chance we might be in package C8 state
or deeper, and we'll get a hard hang when restoring LCPLL (also, a red
led lights up on my motherboard). So grab the force_wake, which will
get us out of RC6 and, as a consequence, out of PC8+ (since we need
RC6 to get into PC8+).
v2: Call the correct force_wake interface.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 00114a5..ef22161 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -6031,6 +6031,10 @@ void hsw_restore_lcpll(struct drm_i915_private *dev_priv)
LCPLL_POWER_DOWN_ALLOW)) == LCPLL_PLL_LOCK)
return;
+ /* Make sure we're not on PC8 state before disabling PC8, otherwise
+ * we'll hang the machine! */
+ gen6_gt_force_wake_get(dev_priv);
+
if (val & LCPLL_POWER_DOWN_ALLOW) {
val &= ~LCPLL_POWER_DOWN_ALLOW;
I915_WRITE(LCPLL_CTL, val);
@@ -6058,6 +6062,8 @@ void hsw_restore_lcpll(struct drm_i915_private *dev_priv)
LCPLL_CD_SOURCE_FCLK_DONE) == 0, 1))
DRM_ERROR("Switching back to LCPLL failed\n");
}
+
+ gen6_gt_force_wake_put(dev_priv);
}
static void haswell_modeset_global_resources(struct drm_device *dev)
--
1.8.1.2
next prev parent reply other threads:[~2013-08-19 19:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 16:18 [PATCH 0/6] Final PC8+ patches Paulo Zanoni
2013-08-19 16:18 ` [PATCH 1/6] drm/i915: grab force_wake when restoring LCPLL Paulo Zanoni
2013-08-19 18:25 ` Chris Wilson
2013-08-19 19:01 ` Paulo Zanoni [this message]
2013-08-19 22:53 ` Ben Widawsky
2013-08-20 14:27 ` Paulo Zanoni
2013-08-19 16:18 ` [PATCH 2/6] drm/i915: fix SDEIMR assertion when disabling LCPLL Paulo Zanoni
2013-08-21 15:37 ` Rodrigo Vivi
2013-08-19 16:18 ` [PATCH 3/6] drm/i915: allow package C8+ states on Haswell (disabled) Paulo Zanoni
2013-08-19 18:29 ` Chris Wilson
2013-08-19 16:18 ` [PATCH 4/6] drm/i915: add i915_pc8_status debugfs file Paulo Zanoni
2013-08-21 15:42 ` Rodrigo Vivi
2013-08-19 16:18 ` [PATCH 5/6] drm/i915: add i915.pc8_timeout function Paulo Zanoni
2013-08-21 15:43 ` Rodrigo Vivi
2013-08-19 16:18 ` [PATCH 6/6] drm/i915: enable Package C8+ by default Paulo Zanoni
2013-08-21 15:43 ` Rodrigo Vivi
2013-08-22 14:13 ` Daniel Vetter
2013-08-19 16:20 ` [PATCH igt] tests: add pc8 Paulo Zanoni
2013-08-20 20:18 ` Daniel Vetter
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=1376938873-3692-1-git-send-email-przanoni@gmail.com \
--to=przanoni@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
/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