Lines Matching full:lock
33 * of the DRM heavyweight hardware lock.
34 * The lock is a read-write lock. Taking it in read mode and write mode
39 * It's allowed to leave kernel space with the vt lock held.
40 * If a user-space process dies while having the vt-lock,
41 * it will be released during the file descriptor release. The vt lock
42 * excludes write lock and read lock.
44 * The suspend mode is used to lock out all TTM users when preparing for
60 * @base: ttm base object used solely to release the lock if the client
61 * holding the lock dies.
62 * @queue: Queue for processes waiting for lock change-of-status.
63 * @lock: Spinlock protecting some lock members.
64 * @rw: Read-write lock counter. Protected by @lock.
65 * @flags: Lock state. Protected by @lock.
71 spinlock_t lock; member
80 * @lock: Pointer to a struct ttm_lock
81 * Initializes the lock.
83 extern void ttm_lock_init(struct ttm_lock *lock);
88 * @lock: Pointer to a struct ttm_lock
90 * Releases a read lock.
92 extern void ttm_read_unlock(struct ttm_lock *lock);
97 * @lock: Pointer to a struct ttm_lock
98 * @interruptible: Interruptible sleeping while waiting for a lock.
100 * Takes the lock in read mode.
104 extern int ttm_read_lock(struct ttm_lock *lock, bool interruptible);
109 * @lock: Pointer to a struct ttm_lock
110 * @interruptible: Interruptible sleeping while waiting for a lock.
112 * Tries to take the lock in read mode. If the lock is already held
113 * in write mode, the function will return -EBUSY. If the lock is held
118 * -EBUSY The lock was already held in write mode.
121 extern int ttm_read_trylock(struct ttm_lock *lock, bool interruptible);
126 * @lock: Pointer to a struct ttm_lock
128 * Releases a write lock.
130 extern void ttm_write_unlock(struct ttm_lock *lock);
135 * @lock: Pointer to a struct ttm_lock
136 * @interruptible: Interruptible sleeping while waiting for a lock.
138 * Takes the lock in write mode.
142 extern int ttm_write_lock(struct ttm_lock *lock, bool interruptible);
147 * @lock: Pointer to a struct ttm_lock
149 * Downgrades a write lock to a read lock.
151 extern void ttm_lock_downgrade(struct ttm_lock *lock);
156 * @lock: Pointer to a struct ttm_lock
158 * Takes the lock in suspend mode. Excludes read and write mode.
160 extern void ttm_suspend_lock(struct ttm_lock *lock);
165 * @lock: Pointer to a struct ttm_lock
167 * Releases a suspend lock
169 extern void ttm_suspend_unlock(struct ttm_lock *lock);
174 * @lock: Pointer to a struct ttm_lock
175 * @interruptible: Interruptible sleeping while waiting for a lock.
176 * @tfile: Pointer to a struct ttm_object_file to register the lock with.
178 * Takes the lock in vt mode.
183 extern int ttm_vt_lock(struct ttm_lock *lock, bool interruptible,
189 * @lock: Pointer to a struct ttm_lock
191 * Releases a vt lock.
193 * -EINVAL If the lock was not held.
195 extern int ttm_vt_unlock(struct ttm_lock *lock);
200 * @lock: Pointer to a struct ttm_lock
202 * Releases a write lock.
204 extern void ttm_write_unlock(struct ttm_lock *lock);
209 * @lock: Pointer to a struct ttm_lock
210 * @interruptible: Interruptible sleeping while waiting for a lock.
212 * Takes the lock in write mode.
216 extern int ttm_write_lock(struct ttm_lock *lock, bool interruptible);