[PATCH 2/4] drm/amdgpu: shorten amdgpu_job_free_resources

Christian König deathsimple at vodafone.de
Fri Jul 1 09:35:38 UTC 2016


Am 30.06.2016 um 11:17 schrieb zhoucm1:
>
>
> On 2016年06月30日 16:53, Christian König wrote:
>> From: Christian König <christian.koenig at amd.com>
>>
>> The fence and the sync object are not hardware resources.
> Isn't job->fence hw fence?

It is, but it isn't a resource. E.g. if we don't release the hardware 
fence immediately all we have blocked is a bit of system memory, but 
VMID or SA space etc...

Can you give me an rb on this one as well? Your comment on patch #3 
sounded like you wanted to do so.

Thanks,
Christian.

>
> David Zhou
>>
>> Signed-off-by: Christian König <christian.koenig at amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 8 +++++---
>>   1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
>> index 87b75d7..347962e 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
>> @@ -89,21 +89,23 @@ static void amdgpu_job_free_resources(struct 
>> amdgpu_job *job)
>>         for (i = 0; i < job->num_ibs; ++i)
>>           amdgpu_ib_free(job->adev, &job->ibs[i], f);
>> -    fence_put(job->fence);
>> -
>> -    amdgpu_sync_free(&job->sync);
>>   }
>>     void amdgpu_job_free_cb(struct amd_sched_job *s_job)
>>   {
>>       struct amdgpu_job *job = container_of(s_job, struct amdgpu_job, 
>> base);
>>   +    fence_put(job->fence);
>> +    amdgpu_sync_free(&job->sync);
>>       kfree(job);
>>   }
>>     void amdgpu_job_free(struct amdgpu_job *job)
>>   {
>>       amdgpu_job_free_resources(job);
>> +
>> +    fence_put(job->fence);
>> +    amdgpu_sync_free(&job->sync);
>>       kfree(job);
>>   }
>



More information about the amd-gfx mailing list