[Intel-gfx] [PATCH 2/2] drm/i915: prefer dma_fence_might_wait in wait_migration
Matthew Auld
matthew.auld at intel.com
Tue Jul 6 09:05:59 UTC 2021
dma_fence_might_wait is more interesting here, since it also teaches
lockdep about the fence critical section and wait_migration dependency.
Suggested-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Signed-off-by: Matthew Auld <matthew.auld at intel.com>
Cc: Thomas Hellström <thomas.hellstrom at linux.intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_wait.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_wait.c b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
index f909aaa09d9c..190e221eaf81 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_wait.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_wait.c
@@ -305,7 +305,7 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
int i915_gem_object_wait_migration(struct drm_i915_gem_object *obj,
unsigned int flags)
{
- might_sleep();
+ dma_fence_might_wait();
/* NOP for now. */
return 0;
}
--
2.26.3
More information about the Intel-gfx
mailing list