Activate error message that was never hit since it was masked

by drm_lock_transfer.
Ifdef out drm_lock_transfer. I see no use for it currently. Should be removed.
main
Thomas Hellstrom 2006-09-27 19:11:27 +02:00
parent f2c03ecae6
commit 1c6f0ea43c
1 changed files with 7 additions and 2 deletions

View File

@ -35,9 +35,12 @@
#include "drmP.h" #include "drmP.h"
#if 0
static int drm_lock_transfer(drm_device_t * dev, static int drm_lock_transfer(drm_device_t * dev,
__volatile__ unsigned int *lock, __volatile__ unsigned int *lock,
unsigned int context); unsigned int context);
#endif
static int drm_notifier(void *priv); static int drm_notifier(void *priv);
/** /**
@ -172,7 +175,7 @@ int drm_unlock(struct inode *inode, struct file *filp,
else { else {
if (drm_lock_free(dev, &dev->lock.hw_lock->lock, if (drm_lock_free(dev, &dev->lock.hw_lock->lock,
lock.context)) { lock.context)) {
DRM_ERROR("\n"); /* FIXME: Should really bail out here. */
} }
} }
@ -217,6 +220,7 @@ int drm_lock_take(__volatile__ unsigned int *lock, unsigned int context)
return 0; return 0;
} }
#if 0
/** /**
* This takes a lock forcibly and hands it to context. Should ONLY be used * This takes a lock forcibly and hands it to context. Should ONLY be used
* inside *_unlock to give lock to kernel before calling *_dma_schedule. * inside *_unlock to give lock to kernel before calling *_dma_schedule.
@ -243,6 +247,7 @@ static int drm_lock_transfer(drm_device_t * dev,
} while (prev != old); } while (prev != old);
return 1; return 1;
} }
#endif
/** /**
* Free lock. * Free lock.
@ -267,7 +272,7 @@ int drm_lock_free(drm_device_t * dev,
} while (prev != old); } while (prev != old);
if (_DRM_LOCK_IS_HELD(old) && _DRM_LOCKING_CONTEXT(old) != context) { if (_DRM_LOCK_IS_HELD(old) && _DRM_LOCKING_CONTEXT(old) != context) {
DRM_DEBUG("%d freed heavyweight lock held by %d\n", DRM_ERROR("%d freed heavyweight lock held by %d\n",
context, _DRM_LOCKING_CONTEXT(old)); context, _DRM_LOCKING_CONTEXT(old));
return 1; return 1;
} }