diff options
| author | Christian König <[email protected]> | 2022-09-05 07:22:29 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-09-19 19:18:23 +0000 |
| commit | c2b08e7a6d270d25e8041510adf82b4a657142d4 (patch) | |
| tree | 3c5ed60eec62f12c01b9de391a63e8bdaa871473 /drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | |
| parent | drm/amdgpu: cleanup error handling in amdgpu_cs_parser_bos (diff) | |
| download | kernel-c2b08e7a6d270d25e8041510adf82b4a657142d4.tar.gz kernel-c2b08e7a6d270d25e8041510adf82b4a657142d4.zip | |
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 <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_job.h')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 5 |
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, |
