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

zhoucm1 david1.zhou at amd.com
Fri Jul 1 09:31:14 UTC 2016



On 2016年07月01日 17:35, Christian König wrote:
> 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.
Yes, feel free to add my RB to it, I forgot it yesterday, and my patches 
is based on yours, I also wait for you pushing it.

Regards,
David Zhou
>
> 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);
>>>   }
>>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx



More information about the amd-gfx mailing list