1 /* 2 * SPDX-License-Identifier: MIT 3 * 4 * Copyright © 2014-2018 Intel Corporation 5 */ 6 7 #ifndef INTEL_ENGINE_POOL_H 8 #define INTEL_ENGINE_POOL_H 9 10 #include "intel_engine_pool_types.h" 11 #include "i915_active.h" 12 #include "i915_request.h" 13 14 struct intel_engine_pool_node * 15 intel_engine_pool_get(struct intel_engine_pool *pool, size_t size); 16 17 static inline int intel_engine_pool_mark_active(struct intel_engine_pool_node * node,struct i915_request * rq)18intel_engine_pool_mark_active(struct intel_engine_pool_node *node, 19 struct i915_request *rq) 20 { 21 return i915_active_ref(&node->active, rq->timeline, rq); 22 } 23 24 static inline void intel_engine_pool_put(struct intel_engine_pool_node * node)25intel_engine_pool_put(struct intel_engine_pool_node *node) 26 { 27 i915_active_release(&node->active); 28 } 29 30 void intel_engine_pool_init(struct intel_engine_pool *pool); 31 void intel_engine_pool_park(struct intel_engine_pool *pool); 32 void intel_engine_pool_fini(struct intel_engine_pool *pool); 33 34 #endif /* INTEL_ENGINE_POOL_H */ 35