drm/i915: Differentiate between aliasing-ppgtt and ggtt pinning
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 26 Mar 2020 14:27:27 +0000 (14:27 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 27 Mar 2020 17:00:51 +0000 (17:00 +0000)
commitd002491168fcd1cd7b8092e8467e21f648748ec2
tree2a1a474c5d76225ef5611ab7afc61341113bd55f
parent0c1abaa7fbfb994d91718f04ac05dc266ac447f4
drm/i915: Differentiate between aliasing-ppgtt and ggtt pinning

Userptr causes lockdep to complain when we are using the aliasing-ppgtt
(and ggtt, but for that it is rightfully so to complain about) in that
when we revoke the userptr we take a mutex which we also use to revoke
the mmaps. However, we only revoke mmaps for GGTT bindings and we never
allow userptr to create a GGTT binding so the warning should be false
and is simply caused by our conflation of the aliasing-ppgtt with the
ggtt. So lets try treating the binding into the aliasing-ppgtt as a
separate lockclass from the ggtt. The downside is that we are
deliberately suppressing lockdep;s ability to warn us of cycles.

Closes: https://gitlab.freedesktop.org/drm/intel/issues/478
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200326142727.31962-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_vma.c