[PATCH 08/12] drm/amdgpu:explicitly call fence_process

Liu, Monk Monk.Liu at amd.com
Mon Oct 9 08:51:38 UTC 2017


I need the hw fence signaled before the following steps, and since I used a loop for that I cannot change to use force_completion() at all 

If you are picky on the duplication here, the good approach is removing the old force_completion(), and use force_completion() in all gpu reset routines 

That's clean way




-----Original Message-----
From: Koenig, Christian 
Sent: 2017年10月9日 16:41
To: Liu, Monk <Monk.Liu at amd.com>; amd-gfx at lists.freedesktop.org
Subject: Re: [PATCH 08/12] drm/amdgpu:explicitly call fence_process

We should avoid functionality duplication here.

Either change the caller of amdgpu_fence_driver_force_completion_ring()
to use amdgpu_fence_driver_force_completion() or use
amdgpu_fence_driver_force_completion_ring() in amdgpu_fence_driver_force_completion().

The later is probably easier to do.

Regards,
Christian.

Am 09.10.2017 um 10:32 schrieb Liu, Monk:
> Why do that ?
>
> In outside there is already a for loop to iterate over all rings so 
> force_completion_ring() is the right one to use
>
> BR Monk
>
> -----Original Message-----
> From: Christian König [mailto:ckoenig.leichtzumerken at gmail.com]
> Sent: 2017年10月9日 16:24
> To: Liu, Monk <Monk.Liu at amd.com>; amd-gfx at lists.freedesktop.org
> Subject: Re: [PATCH 08/12] drm/amdgpu:explicitly call fence_process
>
> Am 30.09.2017 um 08:03 schrieb Monk Liu:
>> this way no need to wait timer triggered to save time
> In principle a good idea, but please remove
> amdgpu_fence_driver_force_completion_ring() and use
> amdgpu_fence_driver_force_completion() instead.
>
> Regards,
> Christian.
>
>> Change-Id: Ie96fd2fc1f6054ebc1e58c3d703471639371ee22
>> Signed-off-by: Monk Liu <Monk.Liu at amd.com>
>> ---
>>    drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 7 ++++++-
>>    1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c 
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>> index 333bad7..13785d8 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
>> @@ -543,8 +543,13 @@ void amdgpu_fence_driver_force_completion(struct 
>> amdgpu_device *adev)
>>    
>>    void amdgpu_fence_driver_force_completion_ring(struct amdgpu_ring *ring)
>>    {
>> -	if (ring)
>> +	if (ring) {
>>    		amdgpu_fence_write(ring, ring->fence_drv.sync_seq);
>> +		/* call fence process manually can get it done quickly
>> +		 * instead of waiting for the timer triggered
>> +		 */
>> +		amdgpu_fence_process(ring);
>> +	}
>>    }
>>    
>>    /*
>



More information about the amd-gfx mailing list