dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Add lock on drm_helper_resume_force_mode
@ 2012-03-23 12:52 Sean Paul
  2012-03-23 12:57 ` Chris Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Sean Paul @ 2012-03-23 12:52 UTC (permalink / raw)
  To: dri-devel; +Cc: marcheu

i915_drm_thaw was not locking the mode_config lock when calling
drm_helper_resume_force_mode. When there were multiple wake sources,
this caused FDI training failure on SNB which in turn corrupted the
display.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/i915/i915_drv.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 8e2c52e..1c554fd 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -535,7 +535,9 @@ static int i915_drm_thaw(struct drm_device *dev)
 		drm_irq_install(dev);
 
 		/* Resume the modeset for every activated CRTC */
+		mutex_lock(&dev->mode_config.mutex);
 		drm_helper_resume_force_mode(dev);
+		mutex_unlock(&dev->mode_config.mutex);
 
 		if (IS_IRONLAKE_M(dev))
 			ironlake_enable_rc6(dev);
-- 
1.7.7.3

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

* Re: [PATCH] drm/i915: Add lock on drm_helper_resume_force_mode
  2012-03-23 12:52 [PATCH] drm/i915: Add lock on drm_helper_resume_force_mode Sean Paul
@ 2012-03-23 12:57 ` Chris Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2012-03-23 12:57 UTC (permalink / raw)
  To: Sean Paul, dri-devel; +Cc: marcheu

On Fri, 23 Mar 2012 08:52:58 -0400, Sean Paul <seanpaul@chromium.org> wrote:
> i915_drm_thaw was not locking the mode_config lock when calling
> drm_helper_resume_force_mode. When there were multiple wake sources,
> this caused FDI training failure on SNB which in turn corrupted the
> display.
> 
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

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

end of thread, other threads:[~2012-03-23 12:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-23 12:52 [PATCH] drm/i915: Add lock on drm_helper_resume_force_mode Sean Paul
2012-03-23 12:57 ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).