Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d8c46fa authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Joonas Lahtinen
Browse files

drm/i915: properly init lockdep class



The code has an ifdef and uses two functions to either init the bare
spinlock or init it and set a lock-class. It is possible to do the same
thing without an ifdef.
With this patch (in debug case) we first use the "default" lock class
which is later overwritten to the supplied one. Without lockdep the set
name/class function vanishes.

Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171214131009.7479-1-joonas.lahtinen@linux.intel.com


Signed-off-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
parent 84ef3a72
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -33,11 +33,8 @@ static void __intel_timeline_init(struct intel_timeline *tl,
{
	tl->fence_context = context;
	tl->common = parent;
#ifdef CONFIG_DEBUG_SPINLOCK
	__raw_spin_lock_init(&tl->lock.rlock, lockname, lockclass);
#else
	spin_lock_init(&tl->lock);
#endif
	lockdep_set_class_and_name(&tl->lock, lockclass, lockname);
	init_request_active(&tl->last_request, NULL);
	INIT_LIST_HEAD(&tl->requests);
	i915_syncmap_init(&tl->sync);