1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2019 Intel Corporation
4  */
5 
6 #ifndef __I915_GEM_LMEM_H
7 #define __I915_GEM_LMEM_H
8 
9 #include <linux/types.h>
10 
11 struct drm_i915_private;
12 struct drm_i915_gem_object;
13 struct intel_memory_region;
14 
15 extern const struct drm_i915_gem_object_ops i915_gem_lmem_obj_ops;
16 
17 void __iomem *
18 i915_gem_object_lmem_io_map(struct drm_i915_gem_object *obj,
19 			    unsigned long n,
20 			    unsigned long size);
21 
22 bool i915_gem_object_is_lmem(struct drm_i915_gem_object *obj);
23 
24 bool __i915_gem_object_is_lmem(struct drm_i915_gem_object *obj);
25 
26 struct drm_i915_gem_object *
27 __i915_gem_object_create_lmem_with_ps(struct drm_i915_private *i915,
28 				      resource_size_t size,
29 				      resource_size_t page_size,
30 				      unsigned int flags);
31 struct drm_i915_gem_object *
32 i915_gem_object_create_lmem(struct drm_i915_private *i915,
33 			    resource_size_t size,
34 			    unsigned int flags);
35 
36 #endif /* !__I915_GEM_LMEM_H */
37