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 					unsigned long flags);
22 void i915_gem_object_release_memory_region(struct drm_i915_gem_object *obj);
23 
24 struct drm_i915_gem_object *
25 i915_gem_object_create_region(struct intel_memory_region *mem,
26 			      resource_size_t size,
27 			      unsigned int flags);
28 
29 #endif
30