1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2019 Intel Corporation
4  */
5 
6 #ifndef __I915_GEM_REGION_H__
7 #define __I915_GEM_REGION_H__
8 
9 #include <linux/types.h>
10 
11 struct intel_memory_region;
12 struct drm_i915_gem_object;
13 struct sg_table;
14 
15 int i915_gem_object_get_pages_buddy(struct drm_i915_gem_object *obj);
16 void i915_gem_object_put_pages_buddy(struct drm_i915_gem_object *obj,
17 				     struct sg_table *pages);
18 
19 void i915_gem_object_init_memory_region(struct drm_i915_gem_object *obj,
20 					struct intel_memory_region *mem);
21 void i915_gem_object_release_memory_region(struct drm_i915_gem_object *obj);
22 
23 struct drm_i915_gem_object *
24 i915_gem_object_create_region(struct intel_memory_region *mem,
25 			      resource_size_t size,
26 			      unsigned int flags);
27 
28 #endif
29