• Home
  • Raw
  • Download

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.
66 * @kill_takers: Boolean whether to kill takers of the lock.
73 spinlock_t lock; member
85 * @lock: Pointer to a struct ttm_lock
86 * Initializes the lock.
88 extern void ttm_lock_init(struct ttm_lock *lock);
93 * @lock: Pointer to a struct ttm_lock
95 * Releases a read lock.
97 extern void ttm_read_unlock(struct ttm_lock *lock);
102 * @lock: Pointer to a struct ttm_lock
103 * @interruptible: Interruptible sleeping while waiting for a lock.
105 * Takes the lock in read mode.
109 extern int ttm_read_lock(struct ttm_lock *lock, bool interruptible);
114 * @lock: Pointer to a struct ttm_lock
115 * @interruptible: Interruptible sleeping while waiting for a lock.
117 * Tries to take the lock in read mode. If the lock is already held
118 * in write mode, the function will return -EBUSY. If the lock is held
123 * -EBUSY The lock was already held in write mode.
126 extern int ttm_read_trylock(struct ttm_lock *lock, bool interruptible);
131 * @lock: Pointer to a struct ttm_lock
133 * Releases a write lock.
135 extern void ttm_write_unlock(struct ttm_lock *lock);
140 * @lock: Pointer to a struct ttm_lock
141 * @interruptible: Interruptible sleeping while waiting for a lock.
143 * Takes the lock in write mode.
147 extern int ttm_write_lock(struct ttm_lock *lock, bool interruptible);
152 * @lock: Pointer to a struct ttm_lock
154 * Downgrades a write lock to a read lock.
156 extern void ttm_lock_downgrade(struct ttm_lock *lock);
161 * @lock: Pointer to a struct ttm_lock
163 * Takes the lock in suspend mode. Excludes read and write mode.
165 extern void ttm_suspend_lock(struct ttm_lock *lock);
170 * @lock: Pointer to a struct ttm_lock
172 * Releases a suspend lock
174 extern void ttm_suspend_unlock(struct ttm_lock *lock);
179 * @lock: Pointer to a struct ttm_lock
180 * @interruptible: Interruptible sleeping while waiting for a lock.
181 * @tfile: Pointer to a struct ttm_object_file to register the lock with.
183 * Takes the lock in vt mode.
188 extern int ttm_vt_lock(struct ttm_lock *lock, bool interruptible,
194 * @lock: Pointer to a struct ttm_lock
196 * Releases a vt lock.
198 * -EINVAL If the lock was not held.
200 extern int ttm_vt_unlock(struct ttm_lock *lock);
205 * @lock: Pointer to a struct ttm_lock
207 * Releases a write lock.
209 extern void ttm_write_unlock(struct ttm_lock *lock);
214 * @lock: Pointer to a struct ttm_lock
215 * @interruptible: Interruptible sleeping while waiting for a lock.
217 * Takes the lock in write mode.
221 extern int ttm_write_lock(struct ttm_lock *lock, bool interruptible);
226 * @lock: Pointer to a struct ttm_lock
227 * @val: Boolean whether to kill processes taking the lock.
228 * @signal: Signal to send to the process taking the lock.
230 * The kill-when-taking-lock functionality is used to kill processes that keep
233 * - X server takes lock in write mode.
236 * - X server releases the lock on file release.
237 * - Another dri client wants to render, takes the lock and is killed.
240 static inline void ttm_lock_set_kill(struct ttm_lock *lock, bool val, in ttm_lock_set_kill() argument
243 lock->kill_takers = val; in ttm_lock_set_kill()
245 lock->signal = signal; in ttm_lock_set_kill()