All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: Mark up potential allocation paths within i915_sw_fence as might_sleep
@ 2017-12-12 18:06 Chris Wilson
  2017-12-12 18:06 ` [PATCH 2/3] drm/i915: Allow fence allocations to fail Chris Wilson
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Chris Wilson @ 2017-12-12 18:06 UTC (permalink / raw)
  To: intel-gfx

As kmalloc is allowed to block (if given the right flags), mark up the
two i915_sw_fence routines that may call kmalloc as potential sleeping
routines.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_sw_fence.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c
index e8ca67a129d2..1212b04604be 100644
--- a/drivers/gpu/drm/i915/i915_sw_fence.c
+++ b/drivers/gpu/drm/i915/i915_sw_fence.c
@@ -303,6 +303,7 @@ static int __i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence,
 	int pending;
 
 	debug_fence_assert(fence);
+	might_sleep_if(gfpflags_allow_blocking(gfp));
 
 	if (i915_sw_fence_done(signaler))
 		return 0;
@@ -418,6 +419,7 @@ int i915_sw_fence_await_dma_fence(struct i915_sw_fence *fence,
 	int ret;
 
 	debug_fence_assert(fence);
+	might_sleep_if(gfpflags_allow_blocking(gfp));
 
 	if (dma_fence_is_signaled(dma))
 		return 0;
@@ -464,6 +466,7 @@ int i915_sw_fence_await_reservation(struct i915_sw_fence *fence,
 	int ret = 0, pending;
 
 	debug_fence_assert(fence);
+	might_sleep_if(gfpflags_allow_blocking(gfp));
 
 	if (write) {
 		struct dma_fence **shared;
-- 
2.15.1

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

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

end of thread, other threads:[~2017-12-13 13:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-12 18:06 [PATCH 1/3] drm/i915: Mark up potential allocation paths within i915_sw_fence as might_sleep Chris Wilson
2017-12-12 18:06 ` [PATCH 2/3] drm/i915: Allow fence allocations to fail Chris Wilson
2017-12-13 11:15   ` Joonas Lahtinen
2017-12-13 11:25     ` Chris Wilson
2017-12-12 18:06 ` [PATCH 3/3] drm/i915: Ratelimit request allocation under oom Chris Wilson
2017-12-13 11:18   ` Joonas Lahtinen
2017-12-13 11:25     ` Chris Wilson
2017-12-12 18:30 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Mark up potential allocation paths within i915_sw_fence as might_sleep Patchwork
2017-12-12 19:20 ` ✓ Fi.CI.IGT: " Patchwork
2017-12-13 13:29   ` Chris Wilson
2017-12-13 11:08 ` [PATCH 1/3] " Joonas Lahtinen

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.