summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2001-11-27Put back i810 major version number (same reasons as for r128)Keith Whitwell
2001-11-26Put drm version back from 3.0 to 2.2; XFree86 4.1 is the baseline forKeith Whitwell
2001-11-02wrap the MODULE_LICENSE definition.Alan Hourihane
2001-10-22merge kernel 2.4.13-pre6.Alan Hourihane
2001-10-21file mach64.h was initially added on branch mach64-0-0-2-branch.Manuel Teira
2001-10-08commit Abraham vd Merwe fix.Alan Hourihane
2001-09-25merge with 2.4.10 kernelAlan Hourihane
2001-09-18remove Linux 2.3.x cruft.Alan Hourihane
2001-09-17bumped the DRM versions (already done in ddx and client side drivers).Alan Hourihane
2001-09-17Use CCE for 2D acceleration (Gerd Knorr)Alan Hourihane
2001-08-25- Remove the rest of the unneeded client-side libraries.David Dawes
2001-08-24file convert.c was initially added on branch bsd-2-0-0-branch.Alan Hourihane
2001-08-22First part of XFree86 4.1.99.1 merge.David Dawes
2001-08-22Import of XFree86 4.1.99.1David Dawes
2001-08-21file drm_ioctl_table.h was initially added on branch mesa-3-5-branch.Jeff Hartmann
2001-08-19No one's maintaining 2.2.x support - so remove all the cruft.Alan Hourihane
2001-08-14A few warning fixes when actually building under 2.4.9-pre2 + someJeff Hartmann
2001-08-13Sync with Linus 2.4.9-pre2 + make all nopage routines more alikeJeff Hartmann
2001-08-11new multihead code was missing Voodoo3 2000 and Voodoo4 support.Alan Hourihane
2001-08-10Commit Keith Owens kernel Makefile changes, merge and commit alpha patchJeff Hartmann
2001-08-08Update to the code I sent Linus and Alan this morning. Added some missingJeff Hartmann
2001-08-07Avoid compiler warning about r_list being used uninitialized.Jeff Hartmann
2001-08-07Lots of DRM fixes: added new pieces of template code so the ffb driver canJeff Hartmann
2001-07-30Merge the multihead-1-0-0 branch into the trunk, with the exception of theDavid Dawes
2001-07-23Fixes that allow the modules to be built into the kernelJeff Hartmann
2001-07-20Merge checker fixes from Alan Cox made to the drm in the ac kernel tree.Jeff Hartmann
2001-07-20Remove module name hacks because we aren't going to implement this anymoreJeff Hartmann
2001-07-18Add module version name at a lower layer of the code, allows things to beJeff Hartmann
2001-07-17Someone forgot to bump the r128 and i810 drivers properly before the 4.1.0Jeff Hartmann
2001-07-16Added version string to the end of the kernel module name. This allowsJeff Hartmann
2001-07-16i810 drm security fixJeff Hartmann
2001-07-13Fix typo in XFREE86_VERSION().Gareth Hughes
2001-06-18Fix 5 security bugs found by the Stanford toolsJeff Hartmann
2001-06-18Forgot to bump date stamp.Gareth Hughes
2001-06-18Enable shared IRQs in DMA template, use in i810 driver.Gareth Hughes
2001-06-14First pass of 4.1.0 merge.David Dawes
2001-06-14Import of XFree86 4.1.0David Dawes
2001-05-23Only authenticated clients can mmap() (Jeff Hartmann).Gareth Hughes
2001-05-17Make the SiS module work again. At least glxinfo reports it's working, yetAlan Hourihane
2001-05-14finish struct stat type cleanup Fix a build dependencies for the tdfx drmDavid Dawes
2001-05-04add some commented enclosures around the BUS_BASE calls for AlphaAlan Hourihane
2001-05-04file drm_linux.h was initially added on branch bsd-2-0-0-branch.Alan Hourihane
2001-05-04file drm_agpsupport.h was initially added on branch bsd-2-0-0-branch.Alan Hourihane
2001-05-03add new fileAlan Hourihane
2001-05-03Make SiS driver compile with the new templated format. Not tested. minorAlan Hourihane
2001-05-03remove deprecated fileAlan Hourihane
2001-05-01Initial merge for XFree86 4.0.99.3 importDavid Dawes
2001-05-01Import of XFree86 4.0.99.3David Dawes
2001-04-30fix build of i810 kernel driver for 2.4.3 or greater kernelsAlan Hourihane
2001-04-30- PCIGART patches for Alpha from CompaqKevin E Martin
opt">(lock, old, new, failed); } while (failed); if (_DRM_LOCKING_CONTEXT(old) == context) { if (old & _DRM_LOCK_HELD) { if (context != DRM_KERNEL_CONTEXT) { DRM_ERROR("%d holds heavyweight lock\n", context); } return 0; } } if (new == (context | _DRM_LOCK_HELD)) { /* Have lock */ return 1; } return 0; } /* 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. */ int DRM(lock_transfer)(drm_device_t *dev, __volatile__ unsigned int *lock, unsigned int context) { unsigned int old, new; char failed; dev->lock.pid = 0; do { old = *lock; new = context | _DRM_LOCK_HELD; _DRM_CAS(lock, old, new, failed); } while (failed); return 1; } int DRM(lock_free)(drm_device_t *dev, __volatile__ unsigned int *lock, unsigned int context) { unsigned int old, new; pid_t pid = dev->lock.pid; char failed; dev->lock.pid = 0; do { old = *lock; new = 0; _DRM_CAS(lock, old, new, failed); } while (failed); if (_DRM_LOCK_IS_HELD(old) && _DRM_LOCKING_CONTEXT(old) != context) { DRM_ERROR("%d freed heavyweight lock held by %d (pid %d)\n", context, _DRM_LOCKING_CONTEXT(old), pid); return 1; } DRM_WAKEUP_INT((void *)&dev->lock.lock_queue); return 0; } static int DRM(flush_queue)(drm_device_t *dev, int context) { int error; int ret = 0; drm_queue_t *q = dev->queuelist[context]; DRM_DEBUG("\n"); atomic_inc(&q->use_count); if (atomic_read(&q->use_count) > 1) { atomic_inc(&q->block_write); atomic_inc(&q->block_count); error = tsleep((void *)&q->flush_queue, PZERO|PCATCH, "drmfq", 0); if (error) return error; atomic_dec(&q->block_count); } atomic_dec(&q->use_count); /* NOTE: block_write is still incremented! Use drm_flush_unlock_queue to decrement. */ return ret; } static int DRM(flush_unblock_queue)(drm_device_t *dev, int context) { drm_queue_t *q = dev->queuelist[context]; DRM_DEBUG("\n"); atomic_inc(&q->use_count); if (atomic_read(&q->use_count) > 1) { if (atomic_read(&q->block_write)) { atomic_dec(&q->block_write); DRM_WAKEUP_INT((void *)&q->write_queue); } } atomic_dec(&q->use_count); return 0; } int DRM(flush_block_and_flush)(drm_device_t *dev, int context, drm_lock_flags_t flags) { int ret = 0; int i; DRM_DEBUG("\n"); if (flags & _DRM_LOCK_FLUSH) { ret = DRM(flush_queue)(dev, DRM_KERNEL_CONTEXT); if (!ret) ret = DRM(flush_queue)(dev, context); } if (flags & _DRM_LOCK_FLUSH_ALL) { for (i = 0; !ret && i < dev->queue_count; i++) { ret = DRM(flush_queue)(dev, i); } } return ret; } int DRM(flush_unblock)(drm_device_t *dev, int context, drm_lock_flags_t flags) { int ret = 0; int i; DRM_DEBUG("\n"); if (flags & _DRM_LOCK_FLUSH) { ret = DRM(flush_unblock_queue)(dev, DRM_KERNEL_CONTEXT); if (!ret) ret = DRM(flush_unblock_queue)(dev, context); } if (flags & _DRM_LOCK_FLUSH_ALL) { for (i = 0; !ret && i < dev->queue_count; i++) { ret = DRM(flush_unblock_queue)(dev, i); } } return ret; } int DRM(finish)( DRM_IOCTL_ARGS ) { DRM_DEVICE; int ret = 0; drm_lock_t lock; DRM_DEBUG("\n"); DRM_COPY_FROM_USER_IOCTL( lock, (drm_lock_t *)data, sizeof(lock) ); ret = DRM(flush_block_and_flush)(dev, lock.context, lock.flags); DRM(flush_unblock)(dev, lock.context, lock.flags); return ret; } /* If we get here, it means that the process has called DRM_IOCTL_LOCK without calling DRM_IOCTL_UNLOCK. If the lock is not held, then let the signal proceed as usual. If the lock is held, then set the contended flag and keep the signal blocked. Return 1 if the signal should be delivered normally. Return 0 if the signal should be blocked. */ int DRM(notifier)(void *priv) { drm_sigdata_t *s = (drm_sigdata_t *)priv; unsigned int old, new; char failed; /* Allow signal delivery if lock isn't held */ if (!_DRM_LOCK_IS_HELD(s->lock->lock) || _DRM_LOCKING_CONTEXT(s->lock->lock) != s->context) return 1; /* Otherwise, set flag to force call to drmUnlock */ do { old = s->lock->lock; new = old | _DRM_LOCK_CONT; _DRM_CAS(&s->lock->lock, old, new, failed); } while (failed); return 0; }