[Intel-gfx] [PATCH] drm/i915: Migrate stolen objects before hibernation
Chris Wilson
chris at chris-wilson.co.uk
Tue Jun 30 03:11:06 PDT 2015
On Tue, Jun 30, 2015 at 10:58:08AM +0100, Chris Wilson wrote:
> +static int
> +i915_gem_object_migrate_stolen_to_shmemfs(struct drm_i915_gem_object *obj)
> +{
> + struct drm_i915_private *i915 = to_i915(obj->base.dev);
> + struct i915_vma *vma, *vn;
> + struct drm_mm_node node;
> + struct file *file;
> + struct address_space *mapping;
> + int ret, i;
> +
> + if (WARN_ON(i915_gem_object_needs_bit17_swizzle(obj)))
> + return -EINVAL;
Missed:
ret = i915_gem_object_set_to_gtt_domain(obj, false);
if (ret)
return ret;
The unbinding would have been enough to serialise with the GPU, but we
may as well be explicit in our domain management.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list