diff options
author | Christian König <christian.koenig@amd.com> | 2016-06-29 16:10:31 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 22:06:10 +0300 |
commit | a5fb4ec29c74a16ce1c269e52bc85ca86ee41e81 (patch) | |
tree | 108330ce5b0181d0cef561187daf7894297bf7f8 /drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | |
parent | a79a5bdcefc4d283b58eef46804c43c88789dd1f (diff) | |
download | linux-a5fb4ec29c74a16ce1c269e52bc85ca86ee41e81.tar.xz |
drm/amdgpu: earlier free SA resources
Keep the time we don't have a fence associated with the resource smaller.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_job.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c index 347962ea17ab..cdcfda6618d0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c @@ -79,7 +79,7 @@ int amdgpu_job_alloc_with_ib(struct amdgpu_device *adev, unsigned size, return r; } -static void amdgpu_job_free_resources(struct amdgpu_job *job) +void amdgpu_job_free_resources(struct amdgpu_job *job) { struct fence *f; unsigned i; @@ -127,6 +127,7 @@ int amdgpu_job_submit(struct amdgpu_job *job, struct amdgpu_ring *ring, job->owner = owner; job->ctx = entity->fence_context; *f = fence_get(fence); + amdgpu_job_free_resources(job); amd_sched_entity_push_job(&job->base); return 0; @@ -179,7 +180,6 @@ static struct fence *amdgpu_job_run(struct amd_sched_job *sched_job) err: job->fence = fence; - amdgpu_job_free_resources(job); return fence; } |