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_from_data(struct drm_i915_private *i915, 28 const void *data, size_t size); 29 30 struct drm_i915_gem_object * 31 __i915_gem_object_create_lmem_with_ps(struct drm_i915_private *i915, 32 resource_size_t size, 33 resource_size_t page_size, 34 unsigned int flags); 35 struct drm_i915_gem_object * 36 i915_gem_object_create_lmem(struct drm_i915_private *i915, 37 resource_size_t size, 38 unsigned int flags); 39 40 #endif /* !__I915_GEM_LMEM_H */ 41