diff options
author | Chris Wilson | 2016-05-14 08:26:33 +0200 |
---|---|---|
committer | Chris Wilson | 2016-05-14 09:51:39 +0200 |
commit | 461fb99c15a705274cf4a8042362f254ceb1529d (patch) | |
tree | b9bf256224a672a6a4a0ca0fc47bdf83060d1326 /drivers/gpu/drm/i915/i915_drv.c | |
parent | drm/i915: Add distinct stubs for PM hibernation phases (diff) | |
download | kernel-qcow2-linux-461fb99c15a705274cf4a8042362f254ceb1529d.tar.gz kernel-qcow2-linux-461fb99c15a705274cf4a8042362f254ceb1529d.tar.xz kernel-qcow2-linux-461fb99c15a705274cf4a8042362f254ceb1529d.zip |
drm/i915: Update domain tracking for GEM objects on hibernation
When creating the hibernation image, the CPU will read the pages of all
objects and thus conflict with our domain tracking. We need to update
our domain tracking to accurately reflect the state on restoration.
v2: Perform the domain tracking inside freeze, before the image is
written, rather than upon restoration.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Cc: David Weinehall <david.weinehall@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1463207195-22076-2-git-send-email-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 816cacddbe88..7210642e29ad 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1123,7 +1123,17 @@ static int i915_pm_freeze(struct device *dev) static int i915_pm_freeze_late(struct device *dev) { - return i915_pm_suspend_late(dev); + int ret; + + ret = i915_pm_suspend_late(dev); + if (ret) + return ret; + + ret = i915_gem_freeze_late(dev_to_i915(dev)); + if (ret) + return ret; + + return 0; } /* thaw: called after creating the hibernation image, but before turning off. */ |