Lines Matching +full:software +full:- +full:locked

6  * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
13 * all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
27 #include <linux/types.h> /* stackdepot.h is not self-contained */
34 * struct drm_modeset_acquire_ctx - locking context (see ww_acquire_ctx)
36 * @contended: used internally for -EDEADLK handling
38 * @locked: list of held locks
43 * ctx. And if any lock fxn returns -EDEADLK, it must backoff and
52 * drm_modeset_backoff() which drops locks and slow-locks the
66 struct list_head locked; member
78 * struct drm_modeset_lock - used for locking modeset resources.
80 * @head: used to hold its place on &drm_atomi_state.locked list when
92 * Resources that are locked as part of an atomic update are added
109 * drm_modeset_lock_fini - cleanup lock
114 WARN_ON(!list_empty(&lock->head)); in drm_modeset_lock_fini()
118 * drm_modeset_is_locked - equivalent to mutex_is_locked()
123 return ww_mutex_is_locked(&lock->mutex); in drm_modeset_is_locked()
127 * drm_modeset_lock_assert_held - equivalent to lockdep_assert_held()
132 lockdep_assert_held(&lock->mutex.base); in drm_modeset_lock_assert_held()
152 * DRM_MODESET_LOCK_ALL_BEGIN - Helper to acquire modeset locks
177 mutex_lock(&dev->mode_config.mutex); \
185 * DRM_MODESET_LOCK_ALL_END - Helper to release and cleanup modeset locks
191 * if ret is -EDEADLK.
197 * ret will be untouched unless it is -EDEADLK on entry. That means that if you
205 if (ret == -EDEADLK) { \
213 mutex_unlock(&dev->mode_config.mutex);