On Tue, Jul 06, 2021 at 10:05:59AM +0100, Matthew Auld wrote: > 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@xxxxxxxx> > Signed-off-by: Matthew Auld <matthew.auld@xxxxxxxxx> > Cc: Thomas Hellström <thomas.hellstrom@xxxxxxxxxxxxxxx> Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx> Ofc assuming nothing goes boom with lockdep :-) -Daniel > --- > 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 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch