1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2021 Intel Corporation
6 #ifndef _I915_GEM_TTM_PM_H_
7 #define _I915_GEM_TTM_PM_H_
9 #include <linux/types.h>
11 struct intel_memory_region;
12 struct drm_i915_gem_object;
14 #define I915_TTM_BACKUP_ALLOW_GPU BIT(0)
15 #define I915_TTM_BACKUP_PINNED BIT(1)
17 int i915_ttm_backup_region(struct intel_memory_region *mr, u32 flags);
19 void i915_ttm_recover_region(struct intel_memory_region *mr);
21 int i915_ttm_restore_region(struct intel_memory_region *mr, u32 flags);
23 /* Internal I915 TTM functions below. */
24 void i915_ttm_backup_free(struct drm_i915_gem_object *obj);