Lines Matching defs:context
66 if (lock->context == DRM_KERNEL_CONTEXT) {
67 DRM_ERROR("Process %d using kernel context %d\n",
68 DRM_CURRENTPID, lock->context);
76 lock->context, DRM_CURRENTPID,
80 if (lock->context < 0)
86 if (drm_lock_take(&master->lock, lock->context)) {
103 DRM_DEBUG("%d %s\n", lock->context,
111 lock->context);
136 if (lock->context == DRM_KERNEL_CONTEXT) {
137 DRM_ERROR("Process %d using kernel context %d\n",
138 DRM_CURRENTPID, lock->context);
148 if (drm_lock_free(&master->lock, lock->context)) {
159 * \param context locking context.
162 * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
165 unsigned int context)
175 new = context | _DRM_LOCK_HELD |
181 if (_DRM_LOCKING_CONTEXT(old) == context) {
183 if (context != DRM_KERNEL_CONTEXT) {
185 context);
191 if ((_DRM_LOCKING_CONTEXT(new)) == context && (new & _DRM_LOCK_HELD)) {
199 * This takes a lock forcibly and hands it to context. Should ONLY be used
204 * \param context locking context.
208 * Marks the lock as held by the given context, via the \p cmpxchg instruction.
211 unsigned int context)
219 new = context | _DRM_LOCK_HELD;
229 * \param context context.
235 int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context)
253 if (_DRM_LOCK_IS_HELD(old) && _DRM_LOCKING_CONTEXT(old) != context) {
255 context, _DRM_LOCKING_CONTEXT(old));
266 * with the kernel context if it is free, otherwise it gets the highest priority when and if