#include "xe_sync.h"
#include <linux/dma-fence-array.h>
#include <linux/kthread.h>
#include <linux/sched/mm.h>
#include <linux/uaccess.h>
#include <drm/drm_print.h>
#include <drm/drm_syncobj.h>
#include <uapi/drm/xe_drm.h>
#include "xe_device_types.h"
#include "xe_exec_queue.h"
#include "xe_macros.h"
#include "xe_sched_job_types.h"
struct xe_user_fence { … };
static void user_fence_destroy(struct kref *kref)
{ … }
static void user_fence_get(struct xe_user_fence *ufence)
{ … }
static void user_fence_put(struct xe_user_fence *ufence)
{ … }
static struct xe_user_fence *user_fence_create(struct xe_device *xe, u64 addr,
u64 value)
{ … }
static void user_fence_worker(struct work_struct *w)
{ … }
static void kick_ufence(struct xe_user_fence *ufence, struct dma_fence *fence)
{ … }
static void user_fence_cb(struct dma_fence *fence, struct dma_fence_cb *cb)
{ … }
int xe_sync_entry_parse(struct xe_device *xe, struct xe_file *xef,
struct xe_sync_entry *sync,
struct drm_xe_sync __user *sync_user,
unsigned int flags)
{ … }
int xe_sync_entry_add_deps(struct xe_sync_entry *sync, struct xe_sched_job *job)
{ … }
void xe_sync_entry_signal(struct xe_sync_entry *sync, struct dma_fence *fence)
{ … }
void xe_sync_entry_cleanup(struct xe_sync_entry *sync)
{ … }
struct dma_fence *
xe_sync_in_fence_get(struct xe_sync_entry *sync, int num_sync,
struct xe_exec_queue *q, struct xe_vm *vm)
{ … }
struct xe_user_fence *__xe_sync_ufence_get(struct xe_user_fence *ufence)
{ … }
struct xe_user_fence *xe_sync_ufence_get(struct xe_sync_entry *sync)
{ … }
void xe_sync_ufence_put(struct xe_user_fence *ufence)
{ … }
int xe_sync_ufence_get_status(struct xe_user_fence *ufence)
{ … }