xref: /linux/drivers/gpu/drm/xe/xe_bb.h (revision 55a42f78ffd386e01a5404419f8c5ded7db70a21)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2022 Intel Corporation
4  */
5 
6 #ifndef _XE_BB_H_
7 #define _XE_BB_H_
8 
9 #include "xe_bb_types.h"
10 
11 struct dma_fence;
12 
13 struct xe_gt;
14 struct xe_exec_queue;
15 struct xe_sched_job;
16 enum xe_sriov_vf_ccs_rw_ctxs;
17 
18 struct xe_bb *xe_bb_new(struct xe_gt *gt, u32 dwords, bool usm);
19 struct xe_bb *xe_bb_ccs_new(struct xe_gt *gt, u32 dwords,
20 			    enum xe_sriov_vf_ccs_rw_ctxs ctx_id);
21 struct xe_sched_job *xe_bb_create_job(struct xe_exec_queue *q,
22 				      struct xe_bb *bb);
23 struct xe_sched_job *xe_bb_create_migration_job(struct xe_exec_queue *q,
24 						struct xe_bb *bb, u64 batch_ofs,
25 						u32 second_idx);
26 void xe_bb_free(struct xe_bb *bb, struct dma_fence *fence);
27 
28 #endif
29