Commit 4fb419b2 authored by Ville Syrjälä's avatar Ville Syrjälä

drm: Add drm_modeset_lock_assert_held()

Add a small wrapper around lockdep_assert_held() to make
it a bit more conventinet to use with modeset locks.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190708125325.16576-2-ville.syrjala@linux.intel.comReviewed-by: default avatarJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
parent 0d352a3a
......@@ -114,6 +114,15 @@ static inline bool drm_modeset_is_locked(struct drm_modeset_lock *lock)
return ww_mutex_is_locked(&lock->mutex);
}
/**
* drm_modeset_lock_assert_held - equivalent to lockdep_assert_held()
* @lock: lock to check
*/
static inline void drm_modeset_lock_assert_held(struct drm_modeset_lock *lock)
{
lockdep_assert_held(&lock->mutex.base);
}
int drm_modeset_lock(struct drm_modeset_lock *lock,
struct drm_modeset_acquire_ctx *ctx);
int __must_check drm_modeset_lock_single_interruptible(struct drm_modeset_lock *lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment