Linux-libre 5.3.12-gnu
[librecmc/linux-libre.git] / drivers / gpu / drm / i915 / i915_gem_batch_pool.h
1 /*
2  * SPDX-License-Identifier: MIT
3  *
4  * Copyright © 2014-2018 Intel Corporation
5  */
6
7 #ifndef I915_GEM_BATCH_POOL_H
8 #define I915_GEM_BATCH_POOL_H
9
10 #include <linux/types.h>
11
12 struct drm_i915_gem_object;
13 struct intel_engine_cs;
14
15 struct i915_gem_batch_pool {
16         struct intel_engine_cs *engine;
17         struct list_head cache_list[4];
18 };
19
20 void i915_gem_batch_pool_init(struct i915_gem_batch_pool *pool,
21                               struct intel_engine_cs *engine);
22 void i915_gem_batch_pool_fini(struct i915_gem_batch_pool *pool);
23 struct drm_i915_gem_object *
24 i915_gem_batch_pool_get(struct i915_gem_batch_pool *pool, size_t size);
25
26 #endif /* I915_GEM_BATCH_POOL_H */