[PATCH] drm/i915: Use might_alloc()
Bernard Zhao
bernard at vivo.com
Thu Apr 29 02:42:11 UTC 2021
This maybe used lockdep through the fs_reclaim annotations.
Signed-off-by: Bernard Zhao <bernard at vivo.com>
---
drivers/gpu/drm/i915/i915_sw_fence.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_sw_fence.c b/drivers/gpu/drm/i915/i915_sw_fence.c
index 2744558f3050..cc1b49cabb6c 100644
--- a/drivers/gpu/drm/i915/i915_sw_fence.c
+++ b/drivers/gpu/drm/i915/i915_sw_fence.c
@@ -341,7 +341,7 @@ static int __i915_sw_fence_await_sw_fence(struct i915_sw_fence *fence,
unsigned long flags;
debug_fence_assert(fence);
- might_sleep_if(gfpflags_allow_blocking(gfp));
+ might_alloc(gfp);
if (i915_sw_fence_done(signaler)) {
i915_sw_fence_set_error_once(fence, signaler->error);
@@ -477,7 +477,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));
+ might_alloc(gfp);
if (dma_fence_is_signaled(dma)) {
i915_sw_fence_set_error_once(fence, dma->error);
@@ -576,7 +576,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));
+ might_alloc(gfp);
if (write) {
struct dma_fence **shared;
--
2.31.0
More information about the dri-devel
mailing list