* [PATCH] drm/i915: Hold mode_config lock whilst changing mode for lastclose()
@ 2012-04-16 14:16 Chris Wilson
2012-04-16 18:39 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2012-04-16 14:16 UTC (permalink / raw)
To: intel-gfx; +Cc: stable
Upon lastclose(), we switch back to the fbcon configuration. This
requires taking the mode_config lock in order to serialise the change
with output probing elsewhere.
Reported-by: Oleksij Rempel <bug-track@fisher-privat.net>
References: https://bugs.freedesktop.org/show_bug.cgi?id=48652
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
---
drivers/gpu/drm/i915/intel_fb.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 53d14a0..8da5a37 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -289,6 +289,8 @@ void intel_fb_restore_mode(struct drm_device *dev)
struct drm_mode_config *config = &dev->mode_config;
struct drm_plane *plane;
+ mutex_lock(&dev->mode_config.mutex);
+
ret = drm_fb_helper_restore_fbdev_mode(&dev_priv->fbdev->helper);
if (ret)
DRM_DEBUG("failed to restore crtc mode\n");
@@ -296,4 +298,6 @@ void intel_fb_restore_mode(struct drm_device *dev)
/* Be sure to shut off any planes that may be active */
list_for_each_entry(plane, &config->plane_list, head)
plane->funcs->disable_plane(plane);
+
+ mutex_unlock(&dev->mode_config.mutex);
}
--
1.7.10
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/i915: Hold mode_config lock whilst changing mode for lastclose()
2012-04-16 14:16 [PATCH] drm/i915: Hold mode_config lock whilst changing mode for lastclose() Chris Wilson
@ 2012-04-16 18:39 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2012-04-16 18:39 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx, stable
On Mon, Apr 16, 2012 at 03:16:42PM +0100, Chris Wilson wrote:
> Upon lastclose(), we switch back to the fbcon configuration. This
> requires taking the mode_config lock in order to serialise the change
> with output probing elsewhere.
>
> Reported-by: Oleksij Rempel <bug-track@fisher-privat.net>
> References: https://bugs.freedesktop.org/show_bug.cgi?id=48652
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: stable@kernel.org
Picked up for -fixes (with Jesse's irc ack), thanks for the patch.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-16 18:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 14:16 [PATCH] drm/i915: Hold mode_config lock whilst changing mode for lastclose() Chris Wilson
2012-04-16 18:39 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox