Re: [PATCH v3 2/2] drm/i915: Never return 0 if not all requests retired

2022-11-24 Thread Tvrtko Ursulin
On 23/11/2022 16:21, Janusz Krzysztofik wrote: On Wednesday, 23 November 2022 13:57:26 CET Tvrtko Ursulin wrote: On 23/11/2022 09:28, Janusz Krzysztofik wrote: Hi Tvrtko, Thanks for your comments. On Tuesday, 22 November 2022 11:50:38 CET Tvrtko Ursulin wrote: On 21/11/2022 14:56,

Re: [PATCH v3 2/2] drm/i915: Never return 0 if not all requests retired

2022-11-24 Thread Janusz Krzysztofik
On Wednesday, 23 November 2022 13:57:26 CET Tvrtko Ursulin wrote: > > On 23/11/2022 09:28, Janusz Krzysztofik wrote: > > Hi Tvrtko, > > > > Thanks for your comments. > > > > On Tuesday, 22 November 2022 11:50:38 CET Tvrtko Ursulin wrote: > >> > >> On 21/11/2022 14:56, Janusz Krzysztofik wrote:

Re: [PATCH v3 2/2] drm/i915: Never return 0 if not all requests retired

2022-11-23 Thread Andrzej Hajda
On 21.11.2022 15:56, Janusz Krzysztofik wrote: Users of intel_gt_retire_requests_timeout() expect 0 return value on success. However, we have no protection from passing back 0 potentially returned by a call to dma_fence_wait_timeout() when it succedes right after its timeout has expired.

Re: [PATCH v3 2/2] drm/i915: Never return 0 if not all requests retired

2022-11-23 Thread Tvrtko Ursulin
On 23/11/2022 09:28, Janusz Krzysztofik wrote: Hi Tvrtko, Thanks for your comments. On Tuesday, 22 November 2022 11:50:38 CET Tvrtko Ursulin wrote: On 21/11/2022 14:56, Janusz Krzysztofik wrote: Users of intel_gt_retire_requests_timeout() expect 0 return value on success. However, we

Re: [PATCH v3 2/2] drm/i915: Never return 0 if not all requests retired

2022-11-23 Thread Janusz Krzysztofik
Hi Tvrtko, Thanks for your comments. On Tuesday, 22 November 2022 11:50:38 CET Tvrtko Ursulin wrote: > > On 21/11/2022 14:56, Janusz Krzysztofik wrote: > > Users of intel_gt_retire_requests_timeout() expect 0 return value on > > success. However, we have no protection from passing back 0

Re: [PATCH v3 2/2] drm/i915: Never return 0 if not all requests retired

2022-11-22 Thread Tvrtko Ursulin
On 21/11/2022 14:56, Janusz Krzysztofik wrote: Users of intel_gt_retire_requests_timeout() expect 0 return value on success. However, we have no protection from passing back 0 potentially returned by a call to dma_fence_wait_timeout() when it succedes right after its timeout has expired. Is

[PATCH v3 2/2] drm/i915: Never return 0 if not all requests retired

2022-11-21 Thread Janusz Krzysztofik
Users of intel_gt_retire_requests_timeout() expect 0 return value on success. However, we have no protection from passing back 0 potentially returned by a call to dma_fence_wait_timeout() when it succedes right after its timeout has expired. Replace 0 with -ETIME before potentially using the