Lines Matching refs:master

169 	struct drm_master *master = file_priv->master;  in drm_legacy_lock()  local
185 master->lock.hw_lock ? master->lock.hw_lock->lock : -1, in drm_legacy_lock()
188 add_wait_queue(&master->lock.lock_queue, &entry); in drm_legacy_lock()
189 spin_lock_bh(&master->lock.spinlock); in drm_legacy_lock()
190 master->lock.user_waiters++; in drm_legacy_lock()
191 spin_unlock_bh(&master->lock.spinlock); in drm_legacy_lock()
195 if (!master->lock.hw_lock) { in drm_legacy_lock()
201 if (drm_lock_take(&master->lock, lock->context)) { in drm_legacy_lock()
202 master->lock.file_priv = file_priv; in drm_legacy_lock()
203 master->lock.lock_time = jiffies; in drm_legacy_lock()
216 spin_lock_bh(&master->lock.spinlock); in drm_legacy_lock()
217 master->lock.user_waiters--; in drm_legacy_lock()
218 spin_unlock_bh(&master->lock.spinlock); in drm_legacy_lock()
220 remove_wait_queue(&master->lock.lock_queue, &entry); in drm_legacy_lock()
231 dev->sigdata.lock = master->lock.hw_lock; in drm_legacy_lock()
260 struct drm_master *master = file_priv->master; in drm_legacy_unlock() local
271 if (drm_legacy_lock_free(&master->lock, lock->context)) { in drm_legacy_unlock()
332 struct drm_master *master = file_priv->master; in drm_legacy_i_have_hw_lock() local
334 return (file_priv->lock_count && master->lock.hw_lock && in drm_legacy_i_have_hw_lock()
335 _DRM_LOCK_IS_HELD(master->lock.hw_lock->lock) && in drm_legacy_i_have_hw_lock()
336 master->lock.file_priv == file_priv); in drm_legacy_i_have_hw_lock()
344 if (!dev->master) in drm_legacy_lock_release()
349 filp, _DRM_LOCKING_CONTEXT(file_priv->master->lock.hw_lock->lock)); in drm_legacy_lock_release()
350 drm_legacy_lock_free(&file_priv->master->lock, in drm_legacy_lock_release()
351 _DRM_LOCKING_CONTEXT(file_priv->master->lock.hw_lock->lock)); in drm_legacy_lock_release()
355 void drm_legacy_lock_master_cleanup(struct drm_device *dev, struct drm_master *master) in drm_legacy_lock_master_cleanup() argument
365 if (master->lock.hw_lock) { in drm_legacy_lock_master_cleanup()
366 if (dev->sigdata.lock == master->lock.hw_lock) in drm_legacy_lock_master_cleanup()
368 master->lock.hw_lock = NULL; in drm_legacy_lock_master_cleanup()
369 master->lock.file_priv = NULL; in drm_legacy_lock_master_cleanup()
370 wake_up_interruptible_all(&master->lock.lock_queue); in drm_legacy_lock_master_cleanup()