Lines Matching full:backup
19 * i915_ttm_backup_free - Free any backup attached to this object
20 * @obj: The object whose backup is to be freed.
24 if (obj->ttm.backup) { in i915_ttm_backup_free()
25 i915_gem_object_put(obj->ttm.backup); in i915_ttm_backup_free()
26 obj->ttm.backup = NULL; in i915_ttm_backup_free()
34 * @backup_pinned: On backup, backup also pinned objects.
51 struct drm_i915_gem_object *backup; in i915_ttm_backup() local
56 if (!i915_ttm_cpu_maps_iomem(bo->resource) || obj->ttm.backup) in i915_ttm_backup()
83 backup = i915_gem_object_create_region(i915->mm.regions[INTEL_REGION_SMEM], in i915_ttm_backup()
85 if (IS_ERR(backup)) in i915_ttm_backup()
86 return PTR_ERR(backup); in i915_ttm_backup()
88 err = i915_gem_object_lock(backup, apply->ww); in i915_ttm_backup()
92 backup_bo = i915_gem_to_ttm(backup); in i915_ttm_backup()
97 err = i915_gem_obj_copy_ttm(backup, obj, pm_apply->allow_gpu, false); in i915_ttm_backup()
106 obj->ttm.backup = backup; in i915_ttm_backup()
110 i915_gem_ww_unlock_single(backup); in i915_ttm_backup()
112 i915_gem_object_put(backup); in i915_ttm_backup()
125 * i915_ttm_recover_region - Free the backup of all objects of a region
128 * Checks all objects of a region if there is backup attached and if so
129 * frees that backup. Typically this is called to recover after a partially
130 * performed backup.
147 * @flags: TTM backup flags
150 * evictable or backs them up using a backup object if they are pinned.
173 struct drm_i915_gem_object *backup = obj->ttm.backup; in i915_ttm_restore() local
174 struct ttm_buffer_object *backup_bo = i915_gem_to_ttm(backup); in i915_ttm_restore()
178 if (!backup) in i915_ttm_restore()
184 err = i915_gem_object_lock(backup, apply->ww); in i915_ttm_restore()
194 err = i915_gem_obj_copy_ttm(obj, backup, pm_apply->allow_gpu, in i915_ttm_restore()
199 obj->ttm.backup = NULL; in i915_ttm_restore()
203 i915_gem_ww_unlock_single(backup); in i915_ttm_restore()
206 i915_gem_object_put(backup); in i915_ttm_restore()
214 * @flags: TTM backup flags