summaryrefslogtreecommitdiff
path: root/linux-core/tdfx_drv.c
diff options
context:
space:
mode:
authorRik Faith <faith@alephnull.com>2000-07-19 18:38:41 +0000
committerRik Faith <faith@alephnull.com>2000-07-19 18:38:41 +0000
commitaed8549e91ade1582505ebce50e4a79d99b4436f (patch)
tree75fae913a2327facdbd944b373a7e9ebe4ec9c8c /linux-core/tdfx_drv.c
parent7b888f87fa5ec559df97a7e911dd5a3328895f6f (diff)
Sync with Linux 2.4.0-test4 kernel
Diffstat (limited to 'linux-core/tdfx_drv.c')
-rw-r--r--linux-core/tdfx_drv.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/linux-core/tdfx_drv.c b/linux-core/tdfx_drv.c
index 582832b5..e0a31c50 100644
--- a/linux-core/tdfx_drv.c
+++ b/linux-core/tdfx_drv.c
@@ -48,6 +48,10 @@ static drm_device_t tdfx_device;
drm_ctx_t tdfx_res_ctx;
static struct file_operations tdfx_fops = {
+#if LINUX_VERSION_CODE >= 0x020322
+ /* This started being used approx. 2.3.34 */
+ owner: THIS_MODULE,
+#endif
open: tdfx_open,
flush: drm_flush,
release: tdfx_release,
@@ -625,19 +629,11 @@ int tdfx_lock(struct inode *inode, struct file *filp, unsigned int cmd,
}
}
-#if 0
- DRM_ERROR("pid = %5d, old counter = %5ld\n",
- current->pid, current->counter);
-#endif
+#if LINUX_VERSION_CODE < 0x020400
if (lock.context != tdfx_res_ctx.handle) {
current->counter = 5;
current->priority = DEF_PRIORITY/4;
}
-#if 0
- while (current->counter > 25)
- current->counter >>= 1; /* decrease time slice */
- DRM_ERROR("pid = %5d, new counter = %5ld\n",
- current->pid, current->counter);
#endif
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
@@ -679,19 +675,11 @@ int tdfx_unlock(struct inode *inode, struct file *filp, unsigned int cmd,
}
}
-#if 0
- current->policy |= SCHED_YIELD;
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(1000);
-#endif
-
+#if LINUX_VERSION_CODE < 0x020400
if (lock.context != tdfx_res_ctx.handle) {
current->counter = 5;
current->priority = DEF_PRIORITY;
}
-#if 0
- current->state = TASK_INTERRUPTIBLE;
- schedule_timeout(10);
#endif
return 0;