public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: remove user GTT mappings early during runtime suspend
@ 2014-05-06 11:28 Imre Deak
  2014-05-06 11:40 ` Chris Wilson
  2014-05-07 16:57 ` [PATCH v2] " Imre Deak
  0 siblings, 2 replies; 10+ messages in thread
From: Imre Deak @ 2014-05-06 11:28 UTC (permalink / raw)
  To: intel-gfx

Currently user space can access GEM buffers mapped to GTT through
existing mappings concurrently while the platform specific suspend
handlers are running.  Since these handlers may change the HW state in a
way that would break such accesses, remove the mappings before calling
the handlers.

Suggested by Ville.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 4024e16..2d4bb48 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1321,6 +1321,7 @@ static int intel_runtime_suspend(struct device *device)
 	 */
 	cancel_work_sync(&dev_priv->rps.work);
 	intel_runtime_pm_disable_interrupts(dev);
+	i915_gem_release_all_mmaps(dev_priv);
 
 	if (IS_GEN6(dev)) {
 		ret = 0;
@@ -1340,8 +1341,6 @@ static int intel_runtime_suspend(struct device *device)
 		return ret;
 	}
 
-	i915_gem_release_all_mmaps(dev_priv);
-
 	del_timer_sync(&dev_priv->gpu_error.hangcheck_timer);
 	dev_priv->pm.suspended = true;
 
-- 
1.8.4

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

end of thread, other threads:[~2014-05-22 11:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-06 11:28 [PATCH] drm/i915: remove user GTT mappings early during runtime suspend Imre Deak
2014-05-06 11:40 ` Chris Wilson
2014-05-06 11:42   ` Imre Deak
2014-05-06 11:59     ` Chris Wilson
2014-05-06 14:46       ` Imre Deak
2014-05-06 19:27         ` Daniel Vetter
2014-05-06 20:03           ` Imre Deak
2014-05-07 16:57 ` [PATCH v2] " Imre Deak
2014-05-07 17:11   ` Imre Deak
2014-05-22 11:48   ` Robert Beckett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox