xref: /linux/drivers/gpu/drm/xe/xe_guc_id_mgr.h (revision 906fd46a65383cd639e5eec72a047efc33045d86)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2024 Intel Corporation
4  */
5 
6 #ifndef _XE_GUC_ID_MGR_H_
7 #define _XE_GUC_ID_MGR_H_
8 
9 struct drm_printer;
10 struct xe_guc_id_mgr;
11 
12 int xe_guc_id_mgr_init(struct xe_guc_id_mgr *idm, unsigned int count);
13 
14 int xe_guc_id_mgr_reserve_locked(struct xe_guc_id_mgr *idm, unsigned int count);
15 void xe_guc_id_mgr_release_locked(struct xe_guc_id_mgr *idm, unsigned int id, unsigned int count);
16 
17 int xe_guc_id_mgr_reserve(struct xe_guc_id_mgr *idm, unsigned int count, unsigned int retain);
18 void xe_guc_id_mgr_release(struct xe_guc_id_mgr *idm, unsigned int start, unsigned int count);
19 
20 void xe_guc_id_mgr_print(struct xe_guc_id_mgr *idm, struct drm_printer *p, int indent);
21 
22 #endif
23