mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 19:40:12 +07:00
c4d52feb2c
In preparation for an ever growing number of engines and so ever increasing static array of HW contexts within the GEM context, move the array over to an rbtree, allocated upon first use. Unfortunately, this imposes an rbtree lookup at a few frequent callsites, but we should be able to mitigate those by moving over to using the HW context as our primary type and so only incur the lookup on the boundary with the user GEM context and engines. v2: Check for no HW context in guc_stage_desc_init Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190308132522.21573-4-chris@chris-wilson.co.uk
36 lines
761 B
C
36 lines
761 B
C
/*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
* Copyright © 2019 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _I915_GLOBALS_H_
|
|
#define _I915_GLOBALS_H_
|
|
|
|
typedef void (*i915_global_func_t)(void);
|
|
|
|
struct i915_global {
|
|
struct list_head link;
|
|
|
|
i915_global_func_t shrink;
|
|
i915_global_func_t exit;
|
|
};
|
|
|
|
void i915_global_register(struct i915_global *global);
|
|
|
|
int i915_globals_init(void);
|
|
void i915_globals_park(void);
|
|
void i915_globals_unpark(void);
|
|
void i915_globals_exit(void);
|
|
|
|
/* constructors */
|
|
int i915_global_active_init(void);
|
|
int i915_global_context_init(void);
|
|
int i915_global_gem_context_init(void);
|
|
int i915_global_objects_init(void);
|
|
int i915_global_request_init(void);
|
|
int i915_global_scheduler_init(void);
|
|
int i915_global_vma_init(void);
|
|
|
|
#endif /* _I915_GLOBALS_H_ */
|