summaryrefslogtreecommitdiff
path: root/linux-core
AgeCommit message (Collapse)Author
2004-07-21ATI Rage 128 and Radeon DRM unconditionally depend on PCIDave Airlie
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2004-07-21add some more debugging fix ++ and --Dave Airlie
2004-07-20first set of __user annotations from kernel (Al Viro)Dave Airlie
2004-07-20Kconfig update add i915 bring over some stuff from kernelDave Airlie
2004-07-20add x86_64 architecture defines from kernel (leave AMD64 defines in forDave Airlie
backwards compat)
2004-07-20fix some more NULLs from kernelDave Airlie
2004-07-20attempt to clean up stub_register, register_chrdev isn't good enough toDave Airlie
make the decision for multiple cards with one drm ..
2004-07-15sparse cleanups from kernel: Al ViroDave Airlie
2004-07-14Fix reference counting for stub for new Linux PCI probeDave Airlie
2004-07-14allow O= usage for Linux 2.6 kernel building in another directoryDave Airlie
2004-07-11split out backwards compat into a separate file makes it easier for mergingDave Airlie
to 2.6
2004-07-11fix issue in 2.4 kernels with returning NULL from this functionDave Airlie
2004-07-08Add two items to Makefile clean XFree86 bug: Reported by: Submitted by:Jon Smirl
Reviewed by: Obtained from:
2004-07-05fixes from kernel for 0 vs NULL - mikaDave Airlie
2004-06-21fix bug with pci_disable_device in the wrong place (Paul Mackerras) removeDave Airlie
hack code from me..
2004-06-12dirty hack to make mach64 work, (don't worry I'll get around to fixing itDave Airlie
asap..)
2004-06-10A few changes for recent redhat.Keith Whitwell
2004-06-10i915 drm moduleKeith Whitwell
2004-06-07The dev->devname being passed to request_irq in drm_irq.h is null. With theDave Airlie
old DRM interface, the devname was set in DRM(setunique), but with the current DRM interface >=1.1 the devname is not being set in DRM(set_busid). From: Alan Swanson Approved-by: Dave Airlie <airlied@linux.ie>
2004-05-302.4 compatDave Airlie
2004-05-30fixes from kernel: Make users of page->count use the provided macrosDave Airlie
2004-05-18another 2.4 fixDave Airlie
2004-05-182.4 compat fixDave Airlie
2004-05-10do some real testing and fix the DRM initialising and unloadingDave Airlie
2004-05-09Commit sysfs and drm PCI changes for 2.6 kernelDave Airlie
2004-05-03use drm.. not dri for class...Dave Airlie
2004-05-02fix 2.4 buildDave Airlie
2004-05-02better device class support from Jon Smirls patches..Dave Airlie
2004-04-22Add __user annotations from kernelDave Airlie
2004-04-22add sparc ffb files from kernel just to keep things in syncDave Airlie
2004-04-21bug from Linux kernel list caught by checkerDave Airlie
2004-04-21centralise pci ids into one place and use scripts to generate files forDave Airlie
kernel
2004-04-18Move Makefile.linux to Makefile.Michel Daenzer
Get rid of Makefile juggling hacks which are no longer necessary.
2004-04-12more files for mach64Dave Airlie
2004-04-12Add mach64 to the trunkDave Airlie
2004-04-10include highmem.hDave Airlie
2004-04-10patch from Andrew Morton tree from Arjan van de Ven fixes some oopses seenDave Airlie
with 4G/4G split
2004-04-10align code with Linux kernel.Dave Airlie
2004-04-10remove unused codeDave Airlie
2004-04-10update from linux kernel for ia64Dave Airlie
2004-04-08disable PCI DMA ioctls as they are not used currently until SAVAGE_CMD_DMAAlan Hourihane
is made to work.
2004-04-08big whitespace .. this aligns all the whitespace in this file with the bkDave Airlie
checkout linux tree
2004-04-082.6 sysfs patches + stubs in drmP.h for 2.4 compatibilityDave Airlie
2004-04-08long dev_t patches from 2.6 treeDave Airlie
2004-04-082.6 patches for larger dev_tDave Airlie
2004-04-08more 2.4 compat fnsDave Airlie
2004-04-08patch from Linux kernel 2.6.5Dave Airlie
2004-04-08patch from lkDave Airlie
2004-03-31VIA module fixes:Thomas Hellstrom
1. Fixed up PCI-id's. 2. Fixed 2.6 warning in kernel Makefile.
2004-03-26Added via driver to drm/linux/Config.in Reported by: Terry BarnabyThomas Hellstrom
_context && dev->last_switch <= j && dev->last_switch + DRM_TIME_SLICE > j) { if (dev->timer.expires != dev->last_switch + DRM_TIME_SLICE) { del_timer(&dev->timer); dev->timer.function = wrapper; dev->timer.data = (unsigned long)dev; dev->timer.expires = dev->last_switch+DRM_TIME_SLICE; add_timer(&dev->timer); } return -1; } return candidate; } int DRM(dma_enqueue)(struct file *filp, drm_dma_t *d) { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; int i; drm_queue_t *q; drm_buf_t *buf; int idx; int while_locked = 0; drm_device_dma_t *dma = dev->dma; DECLARE_WAITQUEUE(entry, current); DRM_DEBUG("%d\n", d->send_count); if (d->flags & _DRM_DMA_WHILE_LOCKED) { int context = dev->lock.hw_lock->lock; if (!_DRM_LOCK_IS_HELD(context)) { DRM_ERROR("No lock held during \"while locked\"" " request\n"); return -EINVAL; } if (d->context != _DRM_LOCKING_CONTEXT(context) && _DRM_LOCKING_CONTEXT(context) != DRM_KERNEL_CONTEXT) { DRM_ERROR("Lock held by %d while %d makes" " \"while locked\" request\n", _DRM_LOCKING_CONTEXT(context), d->context); return -EINVAL; } q = dev->queuelist[DRM_KERNEL_CONTEXT]; while_locked = 1; } else { q = dev->queuelist[d->context]; } atomic_inc(&q->use_count); if (atomic_read(&q->block_write)) { add_wait_queue(&q->write_queue, &entry); atomic_inc(&q->block_count); for (;;) { current->state = TASK_INTERRUPTIBLE; if (!atomic_read(&q->block_write)) break; schedule(); if (signal_pending(current)) { atomic_dec(&q->use_count); remove_wait_queue(&q->write_queue, &entry); return -EINTR; } } atomic_dec(&q->block_count); current->state = TASK_RUNNING; remove_wait_queue(&q->write_queue, &entry); } for (i = 0; i < d->send_count; i++) { idx = d->send_indices[i]; if (idx < 0 || idx >= dma->buf_count) { atomic_dec(&q->use_count); DRM_ERROR("Index %d (of %d max)\n", d->send_indices[i], dma->buf_count - 1); return -EINVAL; } buf = dma->buflist[ idx ]; if (buf->filp != filp) { atomic_dec(&q->use_count); DRM_ERROR("Process %d using buffer not owned\n", current->pid); return -EINVAL; } if (buf->list != DRM_LIST_NONE) { atomic_dec(&q->use_count); DRM_ERROR("Process %d using buffer %d on list %d\n", current->pid, buf->idx, buf->list); } buf->used = d->send_sizes[i]; buf->while_locked = while_locked; buf->context = d->context; if (!buf->used) { DRM_ERROR("Queueing 0 length buffer\n"); } if (buf->pending) { atomic_dec(&q->use_count); DRM_ERROR("Queueing pending buffer:" " buffer %d, offset %d\n", d->send_indices[i], i); return -EINVAL; } if (buf->waiting) { atomic_dec(&q->use_count); DRM_ERROR("Queueing waiting buffer:" " buffer %d, offset %d\n", d->send_indices[i], i); return -EINVAL; } buf->waiting = 1; if (atomic_read(&q->use_count) == 1 || atomic_read(&q->finalization)) { DRM(free_buffer)(dev, buf); } else { DRM(waitlist_put)(&q->waitlist, buf); atomic_inc(&q->total_queued); } } atomic_dec(&q->use_count); return 0; } static int DRM(dma_get_buffers_of_order)(struct file *filp, drm_dma_t *d, int order) { drm_file_t *priv = filp->private_data; drm_device_t *dev = priv->dev; int i; drm_buf_t *buf; drm_device_dma_t *dma = dev->dma; for (i = d->granted_count; i < d->request_count; i++) { buf = DRM(freelist_get)(&dma->bufs[order].freelist, d->flags & _DRM_DMA_WAIT); if (!buf) break; if (buf->pending || buf->waiting) { DRM_ERROR("Free buffer %d in use: filp %p (w%d, p%d)\n", buf->idx, buf->filp, buf->waiting, buf->pending); } buf->filp = filp; if (copy_to_user(&d->request_indices[i], &buf->idx, sizeof(buf->idx))) return -EFAULT; if (copy_to_user(&d->request_sizes[i], &buf->total, sizeof(buf->total))) return -EFAULT; ++d->granted_count; } return 0; } int DRM(dma_get_buffers)(struct file *filp, drm_dma_t *dma) { int order; int retcode = 0; int tmp_order; order = DRM(order)(dma->request_size); dma->granted_count = 0; retcode = DRM(dma_get_buffers_of_order)(filp, dma, order); if (dma->granted_count < dma->request_count && (dma->flags & _DRM_DMA_SMALLER_OK)) { for (tmp_order = order - 1; !retcode && dma->granted_count < dma->request_count && tmp_order >= DRM_MIN_ORDER; --tmp_order) { retcode = DRM(dma_get_buffers_of_order)(filp, dma, tmp_order); } } if (dma->granted_count < dma->request_count && (dma->flags & _DRM_DMA_LARGER_OK)) { for (tmp_order = order + 1; !retcode && dma->granted_count < dma->request_count && tmp_order <= DRM_MAX_ORDER; ++tmp_order) { retcode = DRM(dma_get_buffers_of_order)(filp, dma, tmp_order); } } return 0; }