Lines Matching refs:context

43 static int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context);
64 if (lock->context == DRM_KERNEL_CONTEXT) {
65 DRM_ERROR("Process %d using kernel context %d\n",
66 DRM_CURRENTPID, lock->context);
71 lock->context, DRM_CURRENTPID,
87 if (drm_lock_take(&master->lock, lock->context)) {
107 DRM_DEBUG("%d %s\n", lock->context,
121 dev->sigdata.context = lock->context;
131 lock->context);
155 if (lock->context == DRM_KERNEL_CONTEXT) {
156 DRM_ERROR("Process %d using kernel context %d\n",
157 DRM_CURRENTPID, lock->context);
163 if (drm_lock_free(&master->lock, lock->context)) {
177 * \param context locking context.
180 * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
184 unsigned int context)
195 new = context | _DRM_LOCK_HELD |
203 if (_DRM_LOCKING_CONTEXT(old) == context) {
205 if (context != DRM_KERNEL_CONTEXT) {
207 context);
213 if ((_DRM_LOCKING_CONTEXT(new)) == context && (new & _DRM_LOCK_HELD)) {
221 * This takes a lock forcibly and hands it to context. Should ONLY be used
226 * \param context locking context.
230 * Marks the lock as held by the given context, via the \p cmpxchg instruction.
233 unsigned int context)
241 new = context | _DRM_LOCK_HELD;
252 * \param context context.
258 int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context)
278 if (_DRM_LOCK_IS_HELD(old) && _DRM_LOCKING_CONTEXT(old) != context) {
280 context, _DRM_LOCKING_CONTEXT(old));
305 || _DRM_LOCKING_CONTEXT(s->lock->lock) != s->context)
320 * with the kernel context if it is free, otherwise it gets the highest priority when and if