All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: unlock mutex before intel_modeset_init_hw
@ 2012-05-18 20:57 Paulo Zanoni
  2012-05-18 21:22 ` Chris Wilson
  0 siblings, 1 reply; 3+ messages in thread
From: Paulo Zanoni @ 2012-05-18 20:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: unlock mutex before intel_modeset_init_hw
  2012-05-18 20:57 [PATCH] drm/i915: unlock mutex before intel_modeset_init_hw Paulo Zanoni
@ 2012-05-18 21:22 ` Chris Wilson
  2012-05-19 20:40   ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Wilson @ 2012-05-18 21:22 UTC (permalink / raw)
  To: Paulo Zanoni, intel-gfx; +Cc: Paulo Zanoni

On Fri, 18 May 2012 17:57:13 -0300, Paulo Zanoni <przanoni@gmail.com> wrote:
> 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>

My mistake, I thought I was being consistent with the other callsites,
when in fact it was the exact opposite.

Daniel, do you mind erasing the mistake from history and crediting Paulo
for v3? :)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915: unlock mutex before intel_modeset_init_hw
  2012-05-18 21:22 ` Chris Wilson
@ 2012-05-19 20:40   ` Daniel Vetter
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2012-05-19 20:40 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx, Paulo Zanoni

On Fri, May 18, 2012 at 10:22:32PM +0100, Chris Wilson wrote:
> On Fri, 18 May 2012 17:57:13 -0300, Paulo Zanoni <przanoni@gmail.com> wrote:
> > 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>
> 
> My mistake, I thought I was being consistent with the other callsites,
> when in fact it was the exact opposite.
> 
> Daniel, do you mind erasing the mistake from history and crediting Paulo
> for v3? :)
History rectified, thanks for the fix.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-19 20:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18 20:57 [PATCH] drm/i915: unlock mutex before intel_modeset_init_hw Paulo Zanoni
2012-05-18 21:22 ` Chris Wilson
2012-05-19 20:40   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.