summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2004-10-07Fix drm_exit to allow for DRM(global) being deleted when framebuffer isJon Smirl
2004-10-06Revert back to drm_order() instead of using kernel get_order(). TheJon Smirl
2004-10-05Patch for Kconfig for making i830/i915 not build togetherDave Airlie
2004-10-05enable the device in the right order, remove __devinit from drm_intJon Smirl
2004-10-02janitor-list_for_each-drivers-char-drm-radeon_memc.patch from mm kernelJon Smirl
2004-09-30Make the debug memory functions compile for the core model.Jon Smirl
2004-09-30Remove DRM() macros from core ffb driver. DaveA says he'll make it compileJon Smirl
2004-09-30Lindent of core build. Drivers checked for no binary diffs. A few filesJon Smirl
2004-09-30savage.h not used in core buildsJon Smirl
2004-09-30core ffb.h is not used anymoreJon Smirl
2004-09-30Remove unused drm_module.hJon Smirl
2004-09-30Move things around to reduce public symbols and even out files. Switch toJon Smirl
2004-09-30Make fops per driver instead of global, remove default flush, poll, readJon Smirl
2004-09-28Getting the AGP module is a global resource. Make sure a dual PCI/AGPJon Smirl
2004-09-27Fix the shared directory I accidentally stomped onJon Smirl
2004-09-27core needs three new filesJon Smirl
2004-09-27First check in for DRM that splits core from personality modulesJon Smirl
2004-09-27Flip the 2.4 check so that it looks for 2.6 instead. This will allow buildsJon Smirl
2004-09-24README with hints on how to make a 2.6 specific version of a 2.4/2.6 sharedJon Smirl
2004-09-24Makefile reminder to build in 2.6 when on 2.6Jon Smirl
2004-09-24Create new linux-2.6 build. Move all gpl files into the 2.6 build. If youJon Smirl
2004-09-23Remove 2.6 code that allow DRM major device number to be shared. We can addJon Smirl
2004-09-23Add new sysfs support filesJon Smirl
2004-09-231) switches from class_sysfs to drm sysfs implementation to allowJon Smirl
2004-09-22Create permanent maps of framebuffer, aperture and MMIO registers. AddedFelix Kuehling
2004-09-22Remove hotplug reset support from DRM driver. This will be handled by theJon Smirl
2004-09-22Add *.flags to cvsignore.Eric Anholt
2004-09-21Make DRM permanent maps match broken X behavior. X is mapping regions thatJon Smirl
2004-09-20Remove size restriction on permanent addmapJon Smirl
2004-09-20Felix's fix for map request smaller than permanent map sizeJon Smirl
2004-09-20remove HAVE_COUNTERSDave Airlie
2004-09-20another fix after the macro stuffDave Airlie
2004-09-18Fix from: Nishanth Aravamudan replace direct assignment withJon Smirl
2004-09-17Makefile and missing file to build libxf86drm.aJon Smirl
2004-09-17Add the two GPL licensed I2C support files.Jon Smirl
2004-09-17Add linux sysfs i2c support to radeon driver. This patch adds GPL licensedJon Smirl
2004-09-16Let's try adding the dyn-minor patch again. This patch will reuse minorJon Smirl
2004-09-16Fix drm_scatter to properly report it's availabilityJon Smirl
2004-09-15Back dyn-minor patch out for now. fops handling is broken on some cardsJon Smirl
2004-09-15Don't use module_param if it isn't defined in older kernels.Jon Smirl
2004-09-15Dynamic device minor support. Minor device numbers will be reused if theJon Smirl
2004-09-14Add chip family names to the radeon driverJon Smirl
2004-09-12Fix error path in probe() to release resources if there is an error.Jon Smirl
2004-09-12Make the comment match the codeJon Smirl
2004-09-12Fix DRM to compile cleanly with recent kernel changes in PCI IO andJon Smirl
2004-09-10More general patch to mark resources in use by all DRM drivers. Makes theJon Smirl
2004-09-08Update doxygen configuration file. Minor documentation updates/fixes.Jose Fonseca
2004-09-08Adjust permanent mapping code to account for more than one framebuffer mapJon Smirl
2004-09-07Added IOCTL for writing 2D DMA command buffers over PCI. Bumped minorThomas Hellstrom
2004-09-05missed fix as part of last checkinDave Airlie
ile_priv = file_priv; dev->lock.lock_time = jiffies; atomic_inc(&dev->counts[_DRM_STAT_LOCKS]); break; /* Got lock */ } /* Contention */ ret = mtx_sleep((void *)&dev->lock.lock_queue, &dev->dev_lock, PCATCH, "drmlk2", 0); if (ret != 0) break; } DRM_UNLOCK(); DRM_DEBUG("%d %s\n", lock->context, ret ? "interrupted" : "has lock"); if (ret != 0) return ret; /* XXX: Add signal blocking here */ if (dev->driver->dma_quiescent != NULL && (lock->flags & _DRM_LOCK_QUIESCENT)) dev->driver->dma_quiescent(dev); return 0; } int drm_unlock(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_lock *lock = data; DRM_DEBUG("%d (pid %d) requests unlock (0x%08x), flags = 0x%08x\n", lock->context, DRM_CURRENTPID, dev->lock.hw_lock->lock, lock->flags); if (lock->context == DRM_KERNEL_CONTEXT) { DRM_ERROR("Process %d using kernel context %d\n", DRM_CURRENTPID, lock->context); return EINVAL; } atomic_inc(&dev->counts[_DRM_STAT_UNLOCKS]); DRM_LOCK(); drm_lock_transfer(&dev->lock, DRM_KERNEL_CONTEXT); if (drm_lock_free(&dev->lock, DRM_KERNEL_CONTEXT)) { DRM_ERROR("\n"); } DRM_UNLOCK(); return 0; } int drm_lock_take(struct drm_lock_data *lock_data, unsigned int context) { volatile unsigned int *lock = &lock_data->hw_lock->lock; unsigned int old, new; do { old = *lock; if (old & _DRM_LOCK_HELD) new = old | _DRM_LOCK_CONT; else new = context | _DRM_LOCK_HELD; } while (!atomic_cmpset_int(lock, old, new)); 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(struct drm_lock_data *lock_data, unsigned int context) { volatile unsigned int *lock = &lock_data->hw_lock->lock; unsigned int old, new; lock_data->file_priv = NULL; do { old = *lock; new = context | _DRM_LOCK_HELD; } while (!atomic_cmpset_int(lock, old, new)); return 1; } int drm_lock_free(struct drm_lock_data *lock_data, unsigned int context) { volatile unsigned int *lock = &lock_data->hw_lock->lock; unsigned int old, new; lock_data->file_priv = NULL; do { old = *lock; new = 0; } while (!atomic_cmpset_int(lock, old, new)); if (_DRM_LOCK_IS_HELD(old) && _DRM_LOCKING_CONTEXT(old) != context) { DRM_ERROR("%d freed heavyweight lock held by %d\n", context, _DRM_LOCKING_CONTEXT(old)); return 1; } DRM_WAKEUP_INT((void *)&lock_data->lock_queue); return 0; }