Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH] drm/i915: unlock mutex before intel_modeset_init_hw
Date: Fri, 18 May 2012 17:57:13 -0300	[thread overview]
Message-ID: <1337374633-4438-1-git-send-email-przanoni@gmail.com> (raw)

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

Because on IVB, intel_modeset_init_hw calls gen6_enable_rps with locks
the mutex. This problem broke suspend on my machine. It was introduced
in the following commit:

commit 2e1352cf196094f44e73776f41087f4c489ab936
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed May 9 11:56:28 2012 +0100

    drm/i915: gen6_enable_rps() wants to be called after ring initialisation

This fix was actually suggested by Chris Wilson on a conversation, so
the credit goes to him. I just bisected the problem, reported to him
and tested his idea.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 3947804..d3e1948 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -638,9 +638,9 @@ static int i915_drm_thaw(struct drm_device *dev)
 		dev_priv->mm.suspended = 0;
 
 		error = i915_gem_init_hw(dev);
-		intel_modeset_init_hw(dev);
 		mutex_unlock(&dev->struct_mutex);
 
+		intel_modeset_init_hw(dev);
 		drm_mode_config_reset(dev);
 		drm_irq_install(dev);
 
-- 
1.7.9.5

             reply	other threads:[~2012-05-18 20:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 20:57 Paulo Zanoni [this message]
2012-05-18 21:22 ` [PATCH] drm/i915: unlock mutex before intel_modeset_init_hw Chris Wilson
2012-05-19 20:40   ` 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=1337374633-4438-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