diff options
author | Gareth Hughes <gareth@users.sourceforge.net> | 2000-11-26 16:21:35 +0000 |
---|---|---|
committer | Gareth Hughes <gareth@users.sourceforge.net> | 2000-11-26 16:21:35 +0000 |
commit | 95c7f54a07e302ae6d70dd91a3f2ad79648c2899 (patch) | |
tree | 152ca63b7f4a09bbc0200da018d3c03796609f7b | |
parent | edfdc14215508f768dddfb210c1822bea427d672 (diff) |
Merged trunk into branch.
-rw-r--r-- | bsd/Imakefile | 4 | ||||
-rw-r--r-- | libdrm/xf86drm.c | 2 | ||||
-rw-r--r-- | linux-core/mga_drv.c | 2 | ||||
-rw-r--r-- | linux-core/sis_drv.c | 8 | ||||
-rw-r--r-- | linux/Makefile.linux | 2 | ||||
-rw-r--r-- | linux/agpsupport.c | 8 | ||||
-rw-r--r-- | linux/dma.c | 1 | ||||
-rw-r--r-- | linux/mga_drv.c | 2 | ||||
-rw-r--r-- | linux/r128_bufs.c | 20 | ||||
-rw-r--r-- | linux/r128_context.c | 4 | ||||
-rw-r--r-- | linux/sis_context.c | 4 | ||||
-rw-r--r-- | linux/sis_drv.c | 8 |
12 files changed, 39 insertions, 26 deletions
diff --git a/bsd/Imakefile b/bsd/Imakefile index 81445a7d..47dff5bf 100644 --- a/bsd/Imakefile +++ b/bsd/Imakefile @@ -1,4 +1,4 @@ -XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile,v 1.2 2000/08/16 01:45:31 dawes Exp $ +XCOMM $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/drm/kernel/Imakefile,v 1.3 2000/10/27 16:59:40 dawes Exp $ #include <Server.tmpl> @@ -18,7 +18,7 @@ LinkSourceFile(drm.h,$(XF86OSSRC)/linux/drm/kernel) LinkSourceFile(i810_drm.h,$(XF86OSSRC)/linux/drm/kernel) LinkSourceFile(mga_drm.h,$(XF86OSSRC)/linux/drm/kernel) LinkSourceFile(r128_drm.h,$(XF86OSSRC)/linux/drm/kernel) -LinkSourceFile(sis_drm_public.h,$(XF86OSSRC)/linux/drm/kernel) +LinkSourceFile(sis_drm.h,$(XF86OSSRC)/linux/drm/kernel) XCOMM This is a kludge until we determine how best to build the diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index c933f593..5c2c08c3 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -27,7 +27,7 @@ * Authors: Rickard E. (Rik) Faith <faith@valinux.com> * Kevin E. Martin <martin@valinux.com> * - * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.16 2000/08/28 16:55:52 dawes Exp $ + * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.17 2000/09/24 13:51:32 alanh Exp $ * */ diff --git a/linux-core/mga_drv.c b/linux-core/mga_drv.c index a6d2e570..883eb75c 100644 --- a/linux-core/mga_drv.c +++ b/linux-core/mga_drv.c @@ -513,7 +513,7 @@ int mga_release(struct inode *inode, struct file *filp) if (dev->dev_private) ((drm_mga_private_t *)dev->dev_private) ->dispatch_status &= MGA_IN_DISPATCH; - + drm_lock_free(dev, &dev->lock.hw_lock->lock, _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock)); diff --git a/linux-core/sis_drv.c b/linux-core/sis_drv.c index f7fe1cd1..58ff3e0a 100644 --- a/linux-core/sis_drv.c +++ b/linux-core/sis_drv.c @@ -72,7 +72,7 @@ static drm_ioctl_desc_t sis_ioctls[] = { [DRM_IOCTL_NR(DRM_IOCTL_UNBLOCK)] = { drm_unblock, 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_AUTH_MAGIC)] = { drm_authmagic, 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_ADD_MAP)] = { drm_addmap, 1, 1 }, - + [DRM_IOCTL_NR(DRM_IOCTL_ADD_CTX)] = { sis_addctx, 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_RM_CTX)] = { sis_rmctx, 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_MOD_CTX)] = { sis_modctx, 1, 1 }, @@ -242,7 +242,7 @@ static int sis_takedown(drm_device_t *dev) if (dev->agp) { drm_agp_mem_t *temp; drm_agp_mem_t *temp_next; - + temp = dev->agp->memory; while(temp != NULL) { temp_next = temp->next; @@ -423,7 +423,7 @@ int sis_open(struct inode *inode, struct file *filp) { drm_device_t *dev = &sis_device; int retcode = 0; - + DRM_DEBUG("open_count = %d\n", dev->open_count); if (!(retcode = drm_open_helper(inode, filp, dev))) { #if LINUX_VERSION_CODE < 0x020333 @@ -667,7 +667,7 @@ int sis_unlock(struct inode *inode, struct file *filp, unsigned int cmd, if (copy_from_user(&lock, (drm_lock_t *)arg, sizeof(lock))) return -EFAULT; - + if (lock.context == DRM_KERNEL_CONTEXT) { DRM_ERROR("Process %d using kernel context %d\n", current->pid, lock.context); diff --git a/linux/Makefile.linux b/linux/Makefile.linux index 9779922c..2d8abbb5 100644 --- a/linux/Makefile.linux +++ b/linux/Makefile.linux @@ -23,7 +23,7 @@ # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. -# +# # # ***** NOTE NOTE NOTE NOTE NOTE ***** # To override the automatic Linux source tree determination, pass the diff --git a/linux/agpsupport.c b/linux/agpsupport.c index bc383041..0a5976dd 100644 --- a/linux/agpsupport.c +++ b/linux/agpsupport.c @@ -108,7 +108,7 @@ int drm_agp_enable(struct inode *inode, struct file *filp, unsigned int cmd, if (copy_from_user(&mode, (drm_agp_mode_t *)arg, sizeof(mode))) return -EFAULT; - + dev->agp->mode = mode.mode; drm_agp->enable(mode.mode); dev->agp->base = dev->agp->agp_info.aper_base; @@ -201,7 +201,7 @@ int drm_agp_bind(struct inode *inode, struct file *filp, unsigned int cmd, drm_agp_mem_t *entry; int retcode; int page; - + if (!dev->agp->acquired || !drm_agp->bind_memory) return -EINVAL; if (copy_from_user(&request, (drm_agp_binding_t *)arg, sizeof(request))) return -EFAULT; @@ -271,9 +271,9 @@ drm_agp_head_t *drm_agp_init(void) #if LINUX_VERSION_CODE >= 0x020400 case VIA_MVP4: head->chipset = "VIA MVP4"; break; - case VIA_APOLLO_KX133: head->chipset = "VIA Apollo KX133"; + case VIA_APOLLO_KX133: head->chipset = "VIA Apollo KX133"; break; - case VIA_APOLLO_KT133: head->chipset = "VIA Apollo KT133"; + case VIA_APOLLO_KT133: head->chipset = "VIA Apollo KT133"; break; #endif diff --git a/linux/dma.c b/linux/dma.c index 5cc3ec36..56dd2441 100644 --- a/linux/dma.c +++ b/linux/dma.c @@ -405,6 +405,7 @@ int drm_dma_enqueue(drm_device_t *dev, drm_dma_t *d) schedule(); if (signal_pending(current)) { atomic_dec(&q->use_count); + remove_wait_queue(&q->write_queue, &entry); return -EINTR; } } diff --git a/linux/mga_drv.c b/linux/mga_drv.c index a6d2e570..883eb75c 100644 --- a/linux/mga_drv.c +++ b/linux/mga_drv.c @@ -513,7 +513,7 @@ int mga_release(struct inode *inode, struct file *filp) if (dev->dev_private) ((drm_mga_private_t *)dev->dev_private) ->dispatch_status &= MGA_IN_DISPATCH; - + drm_lock_free(dev, &dev->lock.hw_lock->lock, _DRM_LOCKING_CONTEXT(dev->lock.hw_lock->lock)); diff --git a/linux/r128_bufs.c b/linux/r128_bufs.c index 86a63a42..a060749e 100644 --- a/linux/r128_bufs.c +++ b/linux/r128_bufs.c @@ -60,7 +60,9 @@ int r128_addbufs_agp(struct inode *inode, struct file *filp, unsigned int cmd, if (!dma) return -EINVAL; - if (copy_from_user(&request, (drm_buf_desc_t *)arg, sizeof(request))) + if (copy_from_user(&request, + (drm_buf_desc_t *)arg, + sizeof(request))) return -EFAULT; count = request.count; @@ -171,7 +173,9 @@ int r128_addbufs_agp(struct inode *inode, struct file *filp, unsigned int cmd, request.count = entry->buf_count; request.size = size; - if (copy_to_user((drm_buf_desc_t *)arg, &request, sizeof(request))) + if (copy_to_user((drm_buf_desc_t *)arg, + &request, + sizeof(request))) return -EFAULT; dma->flags = _DRM_DMA_USE_AGP; @@ -191,7 +195,9 @@ int r128_addbufs(struct inode *inode, struct file *filp, unsigned int cmd, if (!dev_priv || dev_priv->is_pci) return -EINVAL; - if (copy_from_user(&request, (drm_buf_desc_t *)arg, sizeof(request))) + if (copy_from_user(&request, + (drm_buf_desc_t *)arg, + sizeof(request))) return -EFAULT; #if defined(CONFIG_AGP) || defined(CONFIG_AGP_MODULE) @@ -228,7 +234,9 @@ int r128_mapbufs(struct inode *inode, struct file *filp, unsigned int cmd, ++dev->buf_use; /* Can't allocate more after this call */ spin_unlock(&dev->count_lock); - if (copy_from_user(&request, (drm_buf_map_t *)arg, sizeof(request))) + if (copy_from_user(&request, + (drm_buf_map_t *)arg, + sizeof(request))) return -EFAULT; if (request.count >= dma->buf_count) { @@ -292,7 +300,9 @@ int r128_mapbufs(struct inode *inode, struct file *filp, unsigned int cmd, request.count = dma->buf_count; DRM_DEBUG("%d buffers, retcode = %d\n", request.count, retcode); - if (copy_to_user((drm_buf_map_t *)arg, &request, sizeof(request))) + if (copy_to_user((drm_buf_map_t *)arg, + &request, + sizeof(request))) return -EFAULT; return retcode; diff --git a/linux/r128_context.c b/linux/r128_context.c index 0d8b2f5c..0741e774 100644 --- a/linux/r128_context.c +++ b/linux/r128_context.c @@ -109,7 +109,9 @@ int r128_resctx(struct inode *inode, struct file *filp, unsigned int cmd, memset(&ctx, 0, sizeof(ctx)); for (i = 0; i < DRM_RESERVED_CONTEXTS; i++) { ctx.handle = i; - if (copy_to_user(&res.contexts[i], &i, sizeof(i))) + if (copy_to_user(&res.contexts[i], + &i, + sizeof(i))) return -EFAULT; } } diff --git a/linux/sis_context.c b/linux/sis_context.c index ca847ed7..120d1393 100644 --- a/linux/sis_context.c +++ b/linux/sis_context.c @@ -28,7 +28,7 @@ * Rickard E. (Rik) Faith <faith@valinux.com> * Daryll Strauss <daryll@valinux.com> * Sung-Ching Lin <sclin@sis.com.tw> - * + * */ #define __NO_VERSION__ @@ -142,7 +142,7 @@ int sis_addctx(struct inode *inode, struct file *filp, unsigned int cmd, /* Should this return -EBUSY instead? */ return -ENOMEM; } - + /* new added */ sis_init_context(ctx.handle); diff --git a/linux/sis_drv.c b/linux/sis_drv.c index f7fe1cd1..58ff3e0a 100644 --- a/linux/sis_drv.c +++ b/linux/sis_drv.c @@ -72,7 +72,7 @@ static drm_ioctl_desc_t sis_ioctls[] = { [DRM_IOCTL_NR(DRM_IOCTL_UNBLOCK)] = { drm_unblock, 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_AUTH_MAGIC)] = { drm_authmagic, 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_ADD_MAP)] = { drm_addmap, 1, 1 }, - + [DRM_IOCTL_NR(DRM_IOCTL_ADD_CTX)] = { sis_addctx, 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_RM_CTX)] = { sis_rmctx, 1, 1 }, [DRM_IOCTL_NR(DRM_IOCTL_MOD_CTX)] = { sis_modctx, 1, 1 }, @@ -242,7 +242,7 @@ static int sis_takedown(drm_device_t *dev) if (dev->agp) { drm_agp_mem_t *temp; drm_agp_mem_t *temp_next; - + temp = dev->agp->memory; while(temp != NULL) { temp_next = temp->next; @@ -423,7 +423,7 @@ int sis_open(struct inode *inode, struct file *filp) { drm_device_t *dev = &sis_device; int retcode = 0; - + DRM_DEBUG("open_count = %d\n", dev->open_count); if (!(retcode = drm_open_helper(inode, filp, dev))) { #if LINUX_VERSION_CODE < 0x020333 @@ -667,7 +667,7 @@ int sis_unlock(struct inode *inode, struct file *filp, unsigned int cmd, if (copy_from_user(&lock, (drm_lock_t *)arg, sizeof(lock))) return -EFAULT; - + if (lock.context == DRM_KERNEL_CONTEXT) { DRM_ERROR("Process %d using kernel context %d\n", current->pid, lock.context); |