aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_lock.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-15 16:47:09 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-15 16:47:09 +0200
commitf613022ceef1814cb734bb3375f01962fd3bcf10 (patch)
treee4cd6f6c5e1192e99859a08c71fdfadcc10be4d5 /linux-core/drm_lock.c
parent49fbeb339c232804866cd548d6023fe559597353 (diff)
Allow a "native type" to be associated with a fence sequence.
In the intel case, we can associate a flush with a sequence.
Diffstat (limited to 'linux-core/drm_lock.c')
-rw-r--r--linux-core/drm_lock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-core/drm_lock.c b/linux-core/drm_lock.c
index 69ce2291..8619defb 100644
--- a/linux-core/drm_lock.c
+++ b/linux-core/drm_lock.c
@@ -201,7 +201,7 @@ int drm_lock_take(__volatile__ unsigned int *lock, unsigned int context)
if (old & _DRM_LOCK_HELD)
new = old | _DRM_LOCK_CONT;
else
- new = context | _DRM_LOCK_HELD;
+ new = context | _DRM_LOCK_HELD | _DRM_LOCK_CONT;
prev = cmpxchg(lock, old, new);
} while (prev != old);
if (_DRM_LOCKING_CONTEXT(old) == context) {
@@ -213,7 +213,7 @@ int drm_lock_take(__volatile__ unsigned int *lock, unsigned int context)
return 0;
}
}
- if (new == (context | _DRM_LOCK_HELD)) {
+ if (new == (context | _DRM_LOCK_HELD | _DRM_LOCK_CONT)) {
/* Have lock */
return 1;
}