summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2022-09-05 09:22:29 +0200
committerAlex Deucher <alexander.deucher@amd.com>2022-09-19 15:18:23 -0400
commitc2b08e7a6d270d25e8041510adf82b4a657142d4 (patch)
tree3c5ed60eec62f12c01b9de391a63e8bdaa871473 /drivers/gpu/drm/amd/amdgpu/amdgpu_job.h
parent4953b6b22ab9d7f64706631a027b1ed1130ce4c8 (diff)
downloadlinux-c2b08e7a6d270d25e8041510adf82b4a657142d4.tar.bz2
drm/amdgpu: move entity selection and job init earlier during CS
Initialize the entity for the CS and scheduler job much earlier. v2: fix job initialisation order and use correct scheduler instance Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_job.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_job.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h
index 2a1961bf1194..866d35bbe073 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h
@@ -72,6 +72,11 @@ struct amdgpu_job {
struct amdgpu_ib ibs[];
};
+static inline struct amdgpu_ring *amdgpu_job_ring(struct amdgpu_job *job)
+{
+ return to_amdgpu_ring(job->base.entity->rq->sched);
+}
+
int amdgpu_job_alloc(struct amdgpu_device *adev, unsigned num_ibs,
struct amdgpu_job **job, struct amdgpu_vm *vm);
int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev, unsigned size,