Daniel Vetter 92ec076771 drm/msm: Don't init ww_mutec acquire ctx before needed
For locking semantics it really doesn't matter when we grab the
ticket. But for lockdep validation it does: the acquire ctx is a fake
lockdep. Since other drivers might want to do a full multi-lock dance
in their fault-handler, not just lock a single dma_resv. Therefore we
must init the acquire_ctx only after we've done all the copy_*_user or
anything else that might trigger a pagefault. For msm this means we
need to move it past submit_lookup_objects.

Aside: Why is msm still using struct_mutex, it seems to be using
dma_resv_lock for general buffer state protection?

v2:
- Add comment to explain why the ww ticket setup is separate (Rob)
- Fix up error handling, we need to make sure we don't call
  ww_acquire_fini without _init.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-and-tested-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sean Paul <sean@poorly.run>
Cc: linux-arm-msm@vger.kernel.org
Cc: freedreno@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20191120105607.3023-1-daniel.vetter@ffwll.ch
2019-11-21 11:03:31 +01:00
..
2019-08-14 18:31:10 +02:00
2019-10-04 17:04:05 +01:00
2019-10-03 16:38:50 +02:00
2019-09-19 16:24:24 -07:00
2019-11-20 17:40:32 +01:00
2019-11-20 17:40:32 +01:00
2019-10-23 12:10:05 +02:00
2019-09-16 15:14:43 +02:00
2019-11-20 17:40:32 +01:00
2019-10-23 11:14:11 -04:00
2019-11-04 18:39:58 +01:00
2019-11-19 22:25:55 +01:00
2019-07-22 21:24:10 +02:00
2019-10-08 18:29:00 +02:00
2019-07-22 21:24:10 +02:00
2019-09-19 16:24:24 -07:00