linux/drivers/gpu/drm/xe/xe_sched_job.c

// SPDX-License-Identifier: MIT
/*
 * Copyright © 2021 Intel Corporation
 */

#include "xe_sched_job.h"

#include <drm/xe_drm.h>
#include <linux/dma-fence-chain.h>
#include <linux/slab.h>

#include "xe_device.h"
#include "xe_exec_queue.h"
#include "xe_gt.h"
#include "xe_hw_engine_types.h"
#include "xe_hw_fence.h"
#include "xe_lrc.h"
#include "xe_macros.h"
#include "xe_pm.h"
#include "xe_sync_types.h"
#include "xe_trace.h"
#include "xe_vm.h"

static struct kmem_cache *xe_sched_job_slab;
static struct kmem_cache *xe_sched_job_parallel_slab;

int __init xe_sched_job_module_init(void)
{}

void xe_sched_job_module_exit(void)
{}

static struct xe_sched_job *job_alloc(bool parallel)
{}

bool xe_sched_job_is_migration(struct xe_exec_queue *q)
{}

static void job_free(struct xe_sched_job *job)
{}

static struct xe_device *job_to_xe(struct xe_sched_job *job)
{}

/* Free unused pre-allocated fences */
static void xe_sched_job_free_fences(struct xe_sched_job *job)
{}

struct xe_sched_job *xe_sched_job_create(struct xe_exec_queue *q,
					 u64 *batch_addr)
{}

/**
 * xe_sched_job_destroy - Destroy XE schedule job
 * @ref: reference to XE schedule job
 *
 * Called when ref == 0, drop a reference to job's xe_engine + fence, cleanup
 * base DRM schedule job, and free memory for XE schedule job.
 */
void xe_sched_job_destroy(struct kref *ref)
{}

/* Set the error status under the fence to avoid racing with signaling */
static bool xe_fence_set_error(struct dma_fence *fence, int error)
{}

void xe_sched_job_set_error(struct xe_sched_job *job, int error)
{}

bool xe_sched_job_started(struct xe_sched_job *job)
{}

bool xe_sched_job_completed(struct xe_sched_job *job)
{}

void xe_sched_job_arm(struct xe_sched_job *job)
{}

void xe_sched_job_push(struct xe_sched_job *job)
{}

/**
 * xe_sched_job_last_fence_add_dep - Add last fence dependency to job
 * @job:job to add the last fence dependency to
 * @vm: virtual memory job belongs to
 *
 * Returns:
 * 0 on success, or an error on failing to expand the array.
 */
int xe_sched_job_last_fence_add_dep(struct xe_sched_job *job, struct xe_vm *vm)
{}

/**
 * xe_sched_job_init_user_fence - Initialize user_fence for the job
 * @job: job whose user_fence needs an init
 * @sync: sync to be use to init user_fence
 */
void xe_sched_job_init_user_fence(struct xe_sched_job *job,
				  struct xe_sync_entry *sync)
{}

struct xe_sched_job_snapshot *
xe_sched_job_snapshot_capture(struct xe_sched_job *job)
{}

void xe_sched_job_snapshot_free(struct xe_sched_job_snapshot *snapshot)
{}

void
xe_sched_job_snapshot_print(struct xe_sched_job_snapshot *snapshot,
			    struct drm_printer *p)
{}

int xe_sched_job_add_deps(struct xe_sched_job *job, struct dma_resv *resv,
			  enum dma_resv_usage usage)
{}