#include <linux/kthread.h>
#include <linux/wait.h>
#include <linux/sched.h>
#include <drm/drm_drv.h>
#include "amdgpu.h"
#include "amdgpu_trace.h"
#include "amdgpu_reset.h"
static enum drm_gpu_sched_stat amdgpu_job_timedout(struct drm_sched_job *s_job)
{ … }
int amdgpu_job_alloc(struct amdgpu_device *adev, struct amdgpu_vm *vm,
struct drm_sched_entity *entity, void *owner,
unsigned int num_ibs, struct amdgpu_job **job)
{ … }
int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev,
struct drm_sched_entity *entity, void *owner,
size_t size, enum amdgpu_ib_pool_type pool_type,
struct amdgpu_job **job)
{ … }
void amdgpu_job_set_resources(struct amdgpu_job *job, struct amdgpu_bo *gds,
struct amdgpu_bo *gws, struct amdgpu_bo *oa)
{ … }
void amdgpu_job_free_resources(struct amdgpu_job *job)
{ … }
static void amdgpu_job_free_cb(struct drm_sched_job *s_job)
{ … }
void amdgpu_job_set_gang_leader(struct amdgpu_job *job,
struct amdgpu_job *leader)
{ … }
void amdgpu_job_free(struct amdgpu_job *job)
{ … }
struct dma_fence *amdgpu_job_submit(struct amdgpu_job *job)
{ … }
int amdgpu_job_submit_direct(struct amdgpu_job *job, struct amdgpu_ring *ring,
struct dma_fence **fence)
{ … }
static struct dma_fence *
amdgpu_job_prepare_job(struct drm_sched_job *sched_job,
struct drm_sched_entity *s_entity)
{ … }
static struct dma_fence *amdgpu_job_run(struct drm_sched_job *sched_job)
{ … }
#define to_drm_sched_job(sched_job) …
void amdgpu_job_stop_all_jobs_on_sched(struct drm_gpu_scheduler *sched)
{ … }
const struct drm_sched_backend_ops amdgpu_sched_ops = …;