xref: /linux/drivers/gpu/drm/i915/gem/i915_gem_lmem.h (revision be239684b18e1cdcafcf8c7face4a2f562c745ad)
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 void __iomem *
16 i915_gem_object_lmem_io_map(struct drm_i915_gem_object *obj,
17 			    unsigned long n,
18 			    unsigned long size);
19 
20 bool i915_gem_object_is_lmem(struct drm_i915_gem_object *obj);
21 
22 bool __i915_gem_object_is_lmem(struct drm_i915_gem_object *obj);
23 
24 struct drm_i915_gem_object *
25 i915_gem_object_create_lmem_from_data(struct drm_i915_private *i915,
26 				      const void *data, size_t size);
27 
28 struct drm_i915_gem_object *
29 __i915_gem_object_create_lmem_with_ps(struct drm_i915_private *i915,
30 				      resource_size_t size,
31 				      resource_size_t page_size,
32 				      unsigned int flags);
33 struct drm_i915_gem_object *
34 i915_gem_object_create_lmem(struct drm_i915_private *i915,
35 			    resource_size_t size,
36 			    unsigned int flags);
37 
38 #endif /* !__I915_GEM_LMEM_H */
39