drm/i915: Create distinct lockclasses for execution vs user timelines
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 14 Nov 2016 20:40:57 +0000 (20:40 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 14 Nov 2016 21:00:21 +0000 (21:00 +0000)
commitbb89485e999181a329cafa8e798b6bbf10c1a52a
tree360f0842dd62e56606951724984a487197cfe68b
parent556b748710586afa24a696ba81fe89dc7f41cebd
drm/i915: Create distinct lockclasses for execution vs user timelines

In order to simplify the lockdep annotation, as they become more complex
in the future with deferred execution and multiple paths through the
same functions, create a separate lockclass for the user timeline and
the hardware execution timeline.

We should only ever be locking the user timeline and the execution
timeline in parallel so we only need to create two lock classes, rather
than a separate class for every timeline.

v2: Rename the lock classes to be more consistent with other lockdep.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161114204105.29171-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gem_request.c
drivers/gpu/drm/i915/i915_gem_timeline.c
drivers/gpu/drm/i915/i915_gem_timeline.h