diff options
author | Jeff Hartmann <jhartmann@valinux.com> | 2000-09-27 21:32:19 +0000 |
---|---|---|
committer | Jeff Hartmann <jhartmann@valinux.com> | 2000-09-27 21:32:19 +0000 |
commit | 550dff98b0cf08687cdde697fc6909aeb9cef30f (patch) | |
tree | 9e5eb8724c64891cd1da1239b8798f16a167d19c /linux/lock.c | |
parent | dbe7d55cb08487f688dfbdd29835500b3b087721 (diff) |
Merged the mga-lock-debug-0-2-0-branch with the trunk. This includes
several fixes including: (Jeff) Really disable multitexture (Broken
since Mesa 3.4 integration.)
(Jeff) Various changes in mga_state.c in the kernel module, which includes
a fix to the bug where the first OGL application hangs the machine
w/out rendering anything. This also includes defines for the warp
registers so they are easily human readable.
(Rik and Jeff) Fixed all the schedule loops in the kernel to look like they
are supposed too.
(Jeff) Configurable agp modes: Add the option "AGPMode2x" or "AGPMode4x" to
your XF86Config file.
(Rik) Various cleanups to the mga kernel driver to make it easier to read
and debug.
(Rik) Removed alot of DRM_DEBUG statements from the kernel driver.
Diffstat (limited to 'linux/lock.c')
-rw-r--r-- | linux/lock.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/linux/lock.c b/linux/lock.c index e5fd435f..90d2f130 100644 --- a/linux/lock.c +++ b/linux/lock.c @@ -50,7 +50,6 @@ int drm_lock_take(__volatile__ unsigned int *lock, unsigned int context) { unsigned int old, new, prev; - DRM_DEBUG("%d attempts\n", context); do { old = *lock; if (old & _DRM_LOCK_HELD) new = old | _DRM_LOCK_CONT; @@ -68,11 +67,8 @@ int drm_lock_take(__volatile__ unsigned int *lock, unsigned int context) } if (new == (context | _DRM_LOCK_HELD)) { /* Have lock */ - DRM_DEBUG("%d\n", context); return 1; } - DRM_DEBUG("%d unable to get lock held by %d\n", - context, _DRM_LOCKING_CONTEXT(old)); return 0; } @@ -89,7 +85,6 @@ int drm_lock_transfer(drm_device_t *dev, new = context | _DRM_LOCK_HELD; prev = cmpxchg(lock, old, new); } while (prev != old); - DRM_DEBUG("%d => %d\n", _DRM_LOCKING_CONTEXT(old), context); return 1; } @@ -99,7 +94,6 @@ int drm_lock_free(drm_device_t *dev, unsigned int old, new, prev; pid_t pid = dev->lock.pid; - DRM_DEBUG("%d\n", context); dev->lock.pid = 0; do { old = *lock; @@ -128,10 +122,10 @@ static int drm_flush_queue(drm_device_t *dev, int context) atomic_inc(&q->use_count); if (atomic_read(&q->use_count) > 1) { atomic_inc(&q->block_write); - current->state = TASK_INTERRUPTIBLE; add_wait_queue(&q->flush_queue, &entry); atomic_inc(&q->block_count); for (;;) { + current->state = TASK_INTERRUPTIBLE; if (!DRM_BUFCOUNT(&q->waitlist)) break; schedule(); if (signal_pending(current)) { |