All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/11] drm/amdgpu: Remove call to reservation_object_test_signaled_rcu before wait
@ 2016-08-29  7:08 Chris Wilson
  2016-08-29  7:08 ` [PATCH 02/11] drm/etnaviv: Remove manual " Chris Wilson
                   ` (12 more replies)
  0 siblings, 13 replies; 63+ messages in thread
From: Chris Wilson @ 2016-08-29  7:08 UTC (permalink / raw)
  To: dri-devel; +Cc: Alex Deucher, intel-gfx, Christian König

Since fence_wait_timeout_reservation_object_wait_timeout_rcu() with a
timeout of 0 becomes reservation_object_test_signaled_rcu(), we do not
need to handle such conversion in the caller. The only challenge are
those callers that wish to differentiate the error code between the
nonblocking busy check and potentially blocking wait.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
index 88fbed2389c0..a3e6f883ac2c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
@@ -407,10 +407,8 @@ int amdgpu_gem_wait_idle_ioctl(struct drm_device *dev, void *data,
 		return -ENOENT;
 	}
 	robj = gem_to_amdgpu_bo(gobj);
-	if (timeout == 0)
-		ret = reservation_object_test_signaled_rcu(robj->tbo.resv, true);
-	else
-		ret = reservation_object_wait_timeout_rcu(robj->tbo.resv, true, true, timeout);
+	ret = reservation_object_wait_timeout_rcu(robj->tbo.resv, true, true,
+						  timeout);
 
 	/* ret == 0 means not signaled,
 	 * ret > 0 means signaled
-- 
2.9.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2016-10-10 13:17 UTC | newest]

Thread overview: 63+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29  7:08 [PATCH 01/11] drm/amdgpu: Remove call to reservation_object_test_signaled_rcu before wait Chris Wilson
2016-08-29  7:08 ` [PATCH 02/11] drm/etnaviv: Remove manual " Chris Wilson
2016-09-23 12:55   ` Daniel Vetter
2016-10-05 16:15     ` Sumit Semwal
2016-10-10 13:17       ` Lucas Stach
2016-08-29  7:08 ` [PATCH 03/11] drm/msm: Remove " Chris Wilson
2016-09-23 12:55   ` Daniel Vetter
2016-09-23 13:07     ` [Intel-gfx] " Rob Clark
2016-08-29  7:08 ` [PATCH 04/11] drm/nouveau: " Chris Wilson
2016-09-23 12:55   ` Daniel Vetter
2016-10-05 16:05     ` Sumit Semwal
2016-08-29  7:08 ` [PATCH 05/11] drm/vmwgfx: " Chris Wilson
2016-09-23 12:56   ` Daniel Vetter
2016-10-05 16:11     ` [Intel-gfx] " Sumit Semwal
2016-10-05 17:03       ` Sinclair Yeh
2016-08-29  7:08 ` [PATCH 06/11] dma-buf: Introduce fence_get_rcu_safe() Chris Wilson
2016-08-29  7:08   ` Chris Wilson
2016-09-23 12:59   ` Daniel Vetter
2016-09-23 12:59     ` Daniel Vetter
2016-09-23 13:34     ` Markus Heiser
2016-09-23 13:34       ` Markus Heiser
2016-08-29  7:08 ` [PATCH 07/11] dma-buf: Restart reservation_object_get_fences_rcu() after writes Chris Wilson
2016-08-29  7:08   ` Chris Wilson
2016-09-23 13:03   ` Daniel Vetter
2016-09-23 13:03     ` Daniel Vetter
2016-08-29  7:08 ` [PATCH 08/11] dma-buf: Restart reservation_object_wait_timeout_rcu() " Chris Wilson
2016-08-29  7:08   ` Chris Wilson
2016-09-23 13:18   ` Daniel Vetter
2016-08-29  7:08 ` [PATCH 09/11] dma-buf: Restart reservation_object_test_signaled_rcu() " Chris Wilson
2016-08-29  7:08   ` Chris Wilson
2016-09-23 13:43   ` Daniel Vetter
2016-09-23 13:43     ` Daniel Vetter
2016-08-29  7:08 ` [PATCH 10/11] dma-buf: Use seqlock to close RCU race in test_signaled_single Chris Wilson
2016-08-29  7:08   ` Chris Wilson
2016-09-23 13:49   ` [Linaro-mm-sig] " Daniel Vetter
2016-09-23 13:49     ` Daniel Vetter
2016-09-23 14:02     ` Chris Wilson
2016-09-25 20:43       ` Daniel Vetter
2016-09-25 20:43         ` Daniel Vetter
2016-08-29  7:08 ` [PATCH 11/11] dma-buf: Do a fast lockless check for poll with timeout=0 Chris Wilson
2016-08-29  7:08   ` Chris Wilson
2016-08-29 18:16   ` [PATCH] dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0) Chris Wilson
2016-08-29 18:16     ` Chris Wilson
2016-08-29 18:26     ` Gustavo Padovan
2016-09-13 14:46       ` Sumit Semwal
2016-09-13 14:46         ` Sumit Semwal
2016-09-15  0:00     ` Rafael Antognolli
2016-09-21  7:26       ` Gustavo Padovan
2016-09-21 11:08         ` Chris Wilson
2016-09-23 13:50   ` [Intel-gfx] [PATCH 11/11] dma-buf: Do a fast lockless check for poll with timeout=0 Daniel Vetter
2016-09-23 13:50     ` Daniel Vetter
2016-09-23 14:15     ` Chris Wilson
2016-09-23 15:06     ` Chris Wilson
2016-09-23 15:06       ` Chris Wilson
2016-09-23 15:20     ` [Intel-gfx] " Chris Wilson
2016-09-23 17:59       ` Christian König
2016-09-23 17:59         ` Christian König
2016-09-25 20:44         ` Daniel Vetter
2016-09-25 20:44           ` Daniel Vetter
2016-08-29  7:50 ` ✗ Fi.CI.BAT: warning for series starting with [01/11] drm/amdgpu: Remove call to reservation_object_test_signaled_rcu before wait Patchwork
2016-08-29  8:20 ` [PATCH 01/11] " Christian König
2016-09-23 12:54 ` Daniel Vetter
2016-10-05 16:03   ` Sumit Semwal

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.