25ffd4b11d
As every i915_active_request should be serialised by a dedicated lock, i915_active consists of a tree of locks; one for each node. Markup up the i915_active_request with what lock is supposed to be guarding it so that we can verify that the serialised updated are indeed serialised. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190816121000.8507-2-chris@chris-wilson.co.uk
35 lines
853 B
C
35 lines
853 B
C
/*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* Copyright © 2014-2018 Intel Corporation
|
|
*/
|
|
|
|
#ifndef INTEL_ENGINE_POOL_H
|
|
#define INTEL_ENGINE_POOL_H
|
|
|
|
#include "intel_engine_pool_types.h"
|
|
#include "i915_active.h"
|
|
#include "i915_request.h"
|
|
|
|
struct intel_engine_pool_node *
|
|
intel_engine_pool_get(struct intel_engine_pool *pool, size_t size);
|
|
|
|
static inline int
|
|
intel_engine_pool_mark_active(struct intel_engine_pool_node *node,
|
|
struct i915_request *rq)
|
|
{
|
|
return i915_active_ref(&node->active, rq->timeline, rq);
|
|
}
|
|
|
|
static inline void
|
|
intel_engine_pool_put(struct intel_engine_pool_node *node)
|
|
{
|
|
i915_active_release(&node->active);
|
|
}
|
|
|
|
void intel_engine_pool_init(struct intel_engine_pool *pool);
|
|
void intel_engine_pool_park(struct intel_engine_pool *pool);
|
|
void intel_engine_pool_fini(struct intel_engine_pool *pool);
|
|
|
|
#endif /* INTEL_ENGINE_POOL_H */
|