* [PATCH] drm/i915: Hold CRTC lock whilst freezing the planes
@ 2014-05-22 8:44 Chris Wilson
2014-05-22 9:02 ` Daniel Vetter
2014-05-22 15:47 ` Jesse Barnes
0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2014-05-22 8:44 UTC (permalink / raw)
To: intel-gfx
Daniel keeps on ramping up the warning level of the DRM and our display
core to make it complain whenever the locking rules are not followed.
This caught
commit 24576d23976746cb52e7700c4cadbf4bc1bc3472
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Tue Mar 26 09:25:45 2013 -0700
drm/i915: enable VT switchless resume v3
introducing an unlocked access to the CRTC whilst disabling it for
suspend.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78114
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/i915_drv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 591762c26af4..8450569ff42c 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -532,8 +532,11 @@ static int i915_drm_freeze(struct drm_device *dev)
* for _thaw.
*/
mutex_lock(&dev->mode_config.mutex);
- for_each_crtc(dev, crtc)
+ for_each_crtc(dev, crtc) {
+ mutex_lock(&crtc->mutex);
dev_priv->display.crtc_disable(crtc);
+ mutex_unlock(&crtc->mutex);
+ }
mutex_unlock(&dev->mode_config.mutex);
intel_modeset_suspend_hw(dev);
--
2.0.0.rc2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] drm/i915: Hold CRTC lock whilst freezing the planes
2014-05-22 8:44 [PATCH] drm/i915: Hold CRTC lock whilst freezing the planes Chris Wilson
@ 2014-05-22 9:02 ` Daniel Vetter
2014-05-22 15:47 ` Jesse Barnes
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Vetter @ 2014-05-22 9:02 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Thu, May 22, 2014 at 09:44:40AM +0100, Chris Wilson wrote:
> Daniel keeps on ramping up the warning level of the DRM and our display
> core to make it complain whenever the locking rules are not followed.
> This caught
>
> commit 24576d23976746cb52e7700c4cadbf4bc1bc3472
> Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> Date: Tue Mar 26 09:25:45 2013 -0700
>
> drm/i915: enable VT switchless resume v3
>
> introducing an unlocked access to the CRTC whilst disabling it for
> suspend.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78114
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_drv.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 591762c26af4..8450569ff42c 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -532,8 +532,11 @@ static int i915_drm_freeze(struct drm_device *dev)
> * for _thaw.
> */
> mutex_lock(&dev->mode_config.mutex);
> - for_each_crtc(dev, crtc)
> + for_each_crtc(dev, crtc) {
> + mutex_lock(&crtc->mutex);
> dev_priv->display.crtc_disable(crtc);
> + mutex_unlock(&crtc->mutex);
> + }
> mutex_unlock(&dev->mode_config.mutex);
>
> intel_modeset_suspend_hw(dev);
> --
> 2.0.0.rc2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drm/i915: Hold CRTC lock whilst freezing the planes
2014-05-22 8:44 [PATCH] drm/i915: Hold CRTC lock whilst freezing the planes Chris Wilson
2014-05-22 9:02 ` Daniel Vetter
@ 2014-05-22 15:47 ` Jesse Barnes
1 sibling, 0 replies; 3+ messages in thread
From: Jesse Barnes @ 2014-05-22 15:47 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Thu, 22 May 2014 09:44:40 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:
> Daniel keeps on ramping up the warning level of the DRM and our display
> core to make it complain whenever the locking rules are not followed.
> This caught
>
> commit 24576d23976746cb52e7700c4cadbf4bc1bc3472
> Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> Date: Tue Mar 26 09:25:45 2013 -0700
>
> drm/i915: enable VT switchless resume v3
>
> introducing an unlocked access to the CRTC whilst disabling it for
> suspend.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78114
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 591762c26af4..8450569ff42c 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -532,8 +532,11 @@ static int i915_drm_freeze(struct drm_device *dev)
> * for _thaw.
> */
> mutex_lock(&dev->mode_config.mutex);
> - for_each_crtc(dev, crtc)
> + for_each_crtc(dev, crtc) {
> + mutex_lock(&crtc->mutex);
> dev_priv->display.crtc_disable(crtc);
> + mutex_unlock(&crtc->mutex);
> + }
> mutex_unlock(&dev->mode_config.mutex);
>
> intel_modeset_suspend_hw(dev);
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-22 15:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-22 8:44 [PATCH] drm/i915: Hold CRTC lock whilst freezing the planes Chris Wilson
2014-05-22 9:02 ` Daniel Vetter
2014-05-22 15:47 ` Jesse Barnes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox