1 /* SPDX-License-Identifier: MIT */
3 * Copyright © 2019 Intel Corporation
6 #ifndef __I915_GEM_STOLEN_H__
7 #define __I915_GEM_STOLEN_H__
9 #include <linux/types.h>
11 struct drm_i915_private
;
13 struct drm_i915_gem_object
;
15 int i915_gem_stolen_insert_node(struct drm_i915_private
*dev_priv
,
16 struct drm_mm_node
*node
, u64 size
,
18 int i915_gem_stolen_insert_node_in_range(struct drm_i915_private
*dev_priv
,
19 struct drm_mm_node
*node
, u64 size
,
20 unsigned alignment
, u64 start
,
22 void i915_gem_stolen_remove_node(struct drm_i915_private
*dev_priv
,
23 struct drm_mm_node
*node
);
24 struct intel_memory_region
*i915_gem_stolen_setup(struct drm_i915_private
*i915
);
25 struct drm_i915_gem_object
*
26 i915_gem_object_create_stolen(struct drm_i915_private
*dev_priv
,
27 resource_size_t size
);
28 struct drm_i915_gem_object
*
29 i915_gem_object_create_stolen_for_preallocated(struct drm_i915_private
*dev_priv
,
30 resource_size_t stolen_offset
,
31 resource_size_t gtt_offset
,
32 resource_size_t size
);
34 #endif /* __I915_GEM_STOLEN_H__ */