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

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

 



Yeah, completely fine with me as well. We should just not duplicate that 
handling.

Taking a look at how amdgpu_fence_driver_force_completion() in 
amdgpu_fence_driver_fini() and amdgpu_fence_driver_suspend() what you 
suggest actually looks like the sanest thing to me.

Regards,
Christian.

Am 09.10.2017 um 10:52 schrieb Liu, Monk:
> Amends:
>
> If you are picky on the duplication here, the good approach is removing the old force_completion(), and use force_completion_ring() in all gpu reset routines
>
> -----Original Message-----
> From: Liu, Monk
> Sent: 2017å¹´10æ??9æ?¥ 16:52
> To: Koenig, Christian <Christian.Koenig at amd.com>; amd-gfx at lists.freedesktop.org
> Subject: RE: [PATCH 08/12] drm/amdgpu:explicitly call fence_process
>
> 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);
>>> +	}
>>>     }
>>>     
>>>     /*




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

  Powered by Linux