#include <linux/slab.h>
#include <drm/gpu_scheduler.h>
#include <drm/drm_syncobj.h>
#include "nouveau_drv.h"
#include "nouveau_gem.h"
#include "nouveau_mem.h"
#include "nouveau_dma.h"
#include "nouveau_exec.h"
#include "nouveau_abi16.h"
#include "nouveau_sched.h"
#define NOUVEAU_SCHED_JOB_TIMEOUT_MS …
enum nouveau_sched_priority { … };
int
nouveau_job_init(struct nouveau_job *job,
struct nouveau_job_args *args)
{ … }
void
nouveau_job_fini(struct nouveau_job *job)
{ … }
void
nouveau_job_done(struct nouveau_job *job)
{ … }
void
nouveau_job_free(struct nouveau_job *job)
{ … }
static int
sync_find_fence(struct nouveau_job *job,
struct drm_nouveau_sync *sync,
struct dma_fence **fence)
{ … }
static int
nouveau_job_add_deps(struct nouveau_job *job)
{ … }
static void
nouveau_job_fence_attach_cleanup(struct nouveau_job *job)
{ … }
static int
nouveau_job_fence_attach_prepare(struct nouveau_job *job)
{ … }
static void
nouveau_job_fence_attach(struct nouveau_job *job)
{ … }
int
nouveau_job_submit(struct nouveau_job *job)
{ … }
static struct dma_fence *
nouveau_job_run(struct nouveau_job *job)
{ … }
static struct dma_fence *
nouveau_sched_run_job(struct drm_sched_job *sched_job)
{ … }
static enum drm_gpu_sched_stat
nouveau_sched_timedout_job(struct drm_sched_job *sched_job)
{ … }
static void
nouveau_sched_free_job(struct drm_sched_job *sched_job)
{ … }
static const struct drm_sched_backend_ops nouveau_sched_ops = …;
static int
nouveau_sched_init(struct nouveau_sched *sched, struct nouveau_drm *drm,
struct workqueue_struct *wq, u32 credit_limit)
{ … }
int
nouveau_sched_create(struct nouveau_sched **psched, struct nouveau_drm *drm,
struct workqueue_struct *wq, u32 credit_limit)
{ … }
static void
nouveau_sched_fini(struct nouveau_sched *sched)
{ … }
void
nouveau_sched_destroy(struct nouveau_sched **psched)
{ … }