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 <[email protected]>
Signed-off-by: Matthew Auld <[email protected]>
Cc: Thomas Hellström <[email protected]>
---
 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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to