linux-stable/drivers/dma-buf
Daniel Vetter ef8255506f dma-fence: add might_sleep annotation to _wait()
Do it uncontionally, there's a separate peek function with
dma_fence_is_signalled() which can be called from atomic context.

v2: Consensus calls for an unconditional might_sleep (Chris,
Christian)

Full audit:
- dma-fence.h: Uses MAX_SCHEDULE_TIMOUT, good chance this sleeps
- dma-resv.c: Timeout always at least 1
- st-dma-fence.c: Save to sleep in testcases
- amdgpu_cs.c: Both callers are for variants of the wait ioctl
- amdgpu_device.c: Two callers in vram recover code, both right next
  to mutex_lock.
- amdgpu_vm.c: Use in the vm_wait ioctl, next to _reserve/unreserve
- remaining functions in amdgpu: All for test_ib implementations for
  various engines, caller for that looks all safe (debugfs, driver
  load, reset)
- etnaviv: another wait ioctl
- habanalabs: another wait ioctl
- nouveau_fence.c: hardcoded 15*HZ ... glorious
- nouveau_gem.c: hardcoded 2*HZ ... so not even super consistent, but
  this one does have a WARN_ON :-/ At least this one is only a
  fallback path for when kmalloc fails. Maybe this should be put onto
  some worker list instead, instead of a work per unamp ...
- i915/selftests: Hardecoded HZ / 4 or HZ / 8
- i915/gt/selftests: Going up the callchain looks safe looking at
  nearby callers
- i915/gt/intel_gt_requests.c. Wrapped in a mutex_lock
- i915/gem_i915_gem_wait.c: The i915-version which is called instead
  for i915 fences already has a might_sleep() annotation, so all good

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: "VMware Graphics" <linux-graphics-maintainer@vmware.com>
Cc: Oded Gabbay <oded.gabbay@gmail.com>
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: linux-rdma@vger.kernel.org
Cc: amd-gfx@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200519132756.682888-1-daniel.vetter@ffwll.ch
2020-05-20 13:02:19 +02:00
..
heaps dma-buf: heaps: Remove redundant heap identifier from system heap name 2019-12-17 21:37:40 +05:30
dma-buf.c dma-buf: add peer2peer flag 2020-04-01 09:02:45 +02:00
dma-fence-array.c
dma-fence-chain.c dma-buf: Report signaled links inside dma-fence-chain 2020-04-09 19:52:03 +01:00
dma-fence.c dma-fence: add might_sleep annotation to _wait() 2020-05-20 13:02:19 +02:00
dma-heap.c dma-heap: Make the symbol 'dma_heap_ioctl_cmds' static 2019-12-18 00:41:29 +05:30
dma-resv.c dma-resv: Also prime acquire ctx for lockdep 2019-11-21 11:03:31 +01:00
Kconfig dma-buf: Improve CONFIG_DMABUF_MOVE_NOTIFY help text 2020-03-25 14:36:46 -04:00
Makefile dma-buf: Exercise dma-fence-chain under selftests 2020-04-09 19:58:55 +01:00
selftest.c
selftest.h
selftests.h dma-buf: Exercise dma-fence-chain under selftests 2020-04-09 19:58:55 +01:00
seqno-fence.c
st-dma-fence-chain.c dma-buf: Exercise dma-fence-chain under selftests 2020-04-09 19:58:55 +01:00
st-dma-fence.c dmabuf: Mark up onstack timer for selftests 2019-08-20 13:49:15 +01:00
sw_sync.c compat_ioctl: move more drivers to compat_ptr_ioctl 2019-10-23 17:23:44 +02:00
sync_debug.c
sync_debug.h
sync_file.c - A fix for a memory leak in the dma-buf support 2019-12-09 17:13:19 +10:00
sync_trace.h
udmabuf.c udmabuf: fix dma-buf cpu access 2019-12-18 09:11:38 +01:00