[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210429024211.58245-1-bernard@vivo.com>
Date: Wed, 28 Apr 2021 19:42:11 -0700
From: Bernard Zhao <bernard@...o.com>
To: Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Cc: Bernard Zhao <bernard@...o.com>
Subject: [PATCH] drm/i915: Use might_alloc()
This maybe used lockdep through the fs_reclaim annotations.
Signed-off-by: Bernard Zhao <bernard@...o.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
Powered by blists - more mailing lists