Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / i915 / gt / intel_gt_buffer_pool.h
blob42cbac003e8ad7028f6ad075d3127d7e6aac8976
1 /* SPDX-License-Identifier: MIT */
2 /*
3 * Copyright © 2014-2018 Intel Corporation
4 */
6 #ifndef INTEL_GT_BUFFER_POOL_H
7 #define INTEL_GT_BUFFER_POOL_H
9 #include <linux/types.h>
11 #include "i915_active.h"
12 #include "intel_gt_buffer_pool_types.h"
14 struct intel_gt;
15 struct i915_request;
17 struct intel_gt_buffer_pool_node *
18 intel_gt_get_buffer_pool(struct intel_gt *gt, size_t size);
20 static inline int
21 intel_gt_buffer_pool_mark_active(struct intel_gt_buffer_pool_node *node,
22 struct i915_request *rq)
24 return i915_active_add_request(&node->active, rq);
27 static inline void
28 intel_gt_buffer_pool_put(struct intel_gt_buffer_pool_node *node)
30 i915_active_release(&node->active);
33 void intel_gt_init_buffer_pool(struct intel_gt *gt);
34 void intel_gt_flush_buffer_pool(struct intel_gt *gt);
35 void intel_gt_fini_buffer_pool(struct intel_gt *gt);
37 #endif /* INTEL_GT_BUFFER_POOL_H */