xref: /linux/drivers/gpu/drm/xe/xe_sync.h (revision dd08ebf6c3525a7ea2186e636df064ea47281987)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2021 Intel Corporation
4  */
5 
6 #ifndef _XE_SYNC_H_
7 #define _XE_SYNC_H_
8 
9 #include "xe_sync_types.h"
10 
11 struct xe_device;
12 struct xe_file;
13 struct xe_sched_job;
14 
15 int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
16 			struct xe_sync_entry *sync,
17 			struct drm_xe_sync __user *sync_user,
18 			bool exec, bool compute_mode);
19 int xe_sync_entry_wait(struct xe_sync_entry *sync);
20 int xe_sync_entry_add_deps(struct xe_sync_entry *sync,
21 			   struct xe_sched_job *job);
22 bool xe_sync_entry_signal(struct xe_sync_entry *sync,
23 			  struct xe_sched_job *job,
24 			  struct dma_fence *fence);
25 void xe_sync_entry_cleanup(struct xe_sync_entry *sync);
26 
27 #endif
28