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

Commit 825926d8 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Daniel Vetter
Browse files

drm/atomic: Make sure lock is held in trylock contexts.



This will make sure we get a lockdep spat in all cases
even if the context is a complete garbage pointer.

Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 53edb2c6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -307,6 +307,8 @@ static inline int modeset_lock(struct drm_modeset_lock *lock,
	WARN_ON(ctx->contended);

	if (ctx->trylock_only) {
		lockdep_assert_held(&ctx->ww_ctx);

		if (!ww_mutex_trylock(&lock->mutex))
			return -EBUSY;
		else