diff options
author | Christian König <christian.koenig@amd.com> | 2015-08-25 11:05:36 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-28 21:04:17 +0200 |
commit | e61235db62c5e68e56e59bea62b88f9f3d7a3cf5 (patch) | |
tree | 9f28992f9423cc754e1ea4f94eba149eca96effc /drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | |
parent | drm/amdgpu: let the scheduler work more with jobs v2 (diff) | |
download | linux-e61235db62c5e68e56e59bea62b88f9f3d7a3cf5.tar.xz linux-e61235db62c5e68e56e59bea62b88f9f3d7a3cf5.zip |
drm/amdgpu: add scheduler dependency callback v2
This way the scheduler doesn't wait in it's work thread any more.
v2: fix race conditions
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c index f93fb3541488..de98fbd2971e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c @@ -27,6 +27,12 @@ #include <drm/drmP.h> #include "amdgpu.h" +static struct fence *amdgpu_sched_dependency(struct amd_sched_job *job) +{ + struct amdgpu_job *sched_job = (struct amdgpu_job *)job; + return amdgpu_sync_get_fence(&sched_job->ibs->sync); +} + static struct fence *amdgpu_sched_run_job(struct amd_sched_job *job) { struct amdgpu_job *sched_job; @@ -75,6 +81,7 @@ static void amdgpu_sched_process_job(struct amd_sched_job *job) } struct amd_sched_backend_ops amdgpu_sched_ops = { + .dependency = amdgpu_sched_dependency, .run_job = amdgpu_sched_run_job, .process_job = amdgpu_sched_process_job }; |