[PATCH] drm/amdgpu: reserve space before adding a shared fence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/10/2017 03:02 PM, Christian König wrote:
> Mhm, did you run into an actual issue or was that just from reading the code?

Just reading the code. (maybe adding the prefix [RFC] is better)

Usually it is called near the amdgpu_bo_fence(), but I didn't find it in 
amdgpu_vm_update_level()(now for multi-level PT)

Jerry

>
> The caller should have reserved a shared slot before calling
> amdgpu_vm_update_directories() and I just double checked that and we seem to do
> this everywhere.
>
> Regards,
> Christian.
>
> Am 10.04.2017 um 08:54 schrieb Junwei Zhang:
>> Signed-off-by: Junwei Zhang <Jerry.Zhang at amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> index 157ae50..55af909 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>> @@ -913,6 +913,9 @@ static int amdgpu_vm_update_level(struct amdgpu_device
>> *adev,
>>           if (shadow)
>>               amdgpu_sync_resv(adev, &job->sync, shadow->tbo.resv,
>>                        AMDGPU_FENCE_OWNER_VM);
>> +        r = reservation_object_reserve_shared(parent->bo->tbo.resv);
>> +        if (r)
>> +            goto error_free;
>>           WARN_ON(params.ib->length_dw > ndw);
>>           r = amdgpu_job_submit(job, ring, &vm->entity,
>
>


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux