All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: reserve space before adding a shared fence
@ 2017-04-10  6:54 Junwei Zhang
       [not found] ` <1491807259-7139-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Junwei Zhang @ 2017-04-10  6:54 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Junwei Zhang

Signed-off-by: Junwei Zhang <Jerry.Zhang@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,
-- 
1.9.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amdgpu: reserve space before adding a shared fence
       [not found] ` <1491807259-7139-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
@ 2017-04-10  7:02   ` Christian König
       [not found]     ` <9574da1c-a3a1-f4d3-1d41-695e73c732e0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Christian König @ 2017-04-10  7:02 UTC (permalink / raw)
  To: Junwei Zhang, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Mhm, did you run into an actual issue or was that just from reading the 
code?

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@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,


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amdgpu: reserve space before adding a shared fence
       [not found]     ` <9574da1c-a3a1-f4d3-1d41-695e73c732e0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
@ 2017-04-10  7:11       ` Zhang, Jerry (Junwei)
       [not found]         ` <58EB3030.7030502-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Zhang, Jerry (Junwei) @ 2017-04-10  7:11 UTC (permalink / raw)
  To: Christian König, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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@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,
>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: SPAM //Re: [PATCH] drm/amdgpu: reserve space before adding a shared fence
       [not found]         ` <58EB3030.7030502-5C7GfCeVMHo@public.gmane.org>
@ 2017-04-19 12:31           ` Christian König
  0 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2017-04-19 12:31 UTC (permalink / raw)
  To: Zhang, Jerry (Junwei), amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 10.04.2017 um 09:11 schrieb Zhang, Jerry (Junwei):
> 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)

Yeah, that is usually a good idea, but I'm forgetting it all the time as 
well.

>
> 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)

Ok, in this case that shouldn't be an issue.

Christian.

>
> 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@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,
>>
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-19 12:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-10  6:54 [PATCH] drm/amdgpu: reserve space before adding a shared fence Junwei Zhang
     [not found] ` <1491807259-7139-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2017-04-10  7:02   ` Christian König
     [not found]     ` <9574da1c-a3a1-f4d3-1d41-695e73c732e0-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-10  7:11       ` Zhang, Jerry (Junwei)
     [not found]         ` <58EB3030.7030502-5C7GfCeVMHo@public.gmane.org>
2017-04-19 12:31           ` SPAM //Re: " Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.