summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2004-11-06Remove the vestiges of the memory-debug code.Eric Anholt
2004-11-06Commit WIP of BSD conversion to core model. Compiles for r128, radeon, butEric Anholt
2004-11-05Move ati_pcigart shared routines into drm-core moduleJon Smirl
2004-11-03Fixed bug in via_dma.c. The code didn't check that the lock was held by theThomas Hellstrom
2004-11-01Reworked the jump-code in via_dma.c. The command regulator now seems toThomas Hellstrom
2004-11-01correct historic mis-attribution of copyrightKeith Whitwell
2004-10-31Allow drivers to override reclaim_buffers in an OS-independent way byFelix Kuehling
2004-10-30Some stabilizing work to the DMA ring-buffer code. Temporarily replaced theThomas Hellstrom
2004-10-29Switch SPIN_LOCK_UNLOCKED to spin_lock_init()Jon Smirl
2004-10-29Add include of moduleparam.hJon Smirl
2004-10-28Break poll() to make it match the Xserver's broken expectations.Jon Smirl
2004-10-28fix for 2.4 buildDave Airlie
2004-10-23Round 2 of getting rid of inter_module_get()Jon Smirl
2004-10-23Revert symbol_get() changes from drm_drvJon Smirl
2004-10-23fix inter module put/getDave Airlie
2004-10-23actually 2.6.10 introduced pfn range so it should work now..Dave Airlie
2004-10-23fix pfn vs page for older kernels (2.6.9-rc kernels many not work..)Dave Airlie
2004-10-23Apply radeon r300 microcode patch to non-coreDave Airlie
2004-10-23Prepare to eliminate inter_module_get("agp")Jon Smirl
2004-10-22Bring in patch from kernel for remap_pfn_rangeJon Smirl
2004-10-21Fix up the radeon i2c error handingJon Smirl
2004-10-20Don't release an i2c channel that has not initialized correctlyJon Smirl
2004-10-20Switch linux-core from using dev->pdev->driver->name toJon Smirl
2004-10-20Fix dd vs di version typo in drm_setversionJon Smirl
2004-10-19Add a protective check against a possible buffer overflowJon Smirl
2004-10-19Fix missing I2C busses to be non-fatal error.Jon Smirl
2004-10-19drm-core, Clean up bug error path on stealth mode exitJon Smirl
2004-10-18Update Doxygen configuration & comments.Jose Fonseca
2004-10-16Fixed off by one errors in clipping.Ville Syrjala
2004-10-16Fixed bad formatting.Ville Syrjala
2004-10-15Remove drm_init.cJon Smirl
2004-10-15Move drm_cpu_valid out of drm_init. drm_init is empty now.Jon Smirl
2004-10-15Switch linux-core over to 2.6 parameter model to enable debug useJon Smirl
2004-10-13Add a poll function that alternates between zero and normal poll return toJon Smirl
2004-10-12Via updates. Fixed unlikely but possible uint32_t overflow in ring-bufferThomas Hellstrom
2004-10-12Breakout heads into their own data structures.Jon Smirl
2004-10-10Rename fn_tbl to driver. Core driver now uses pci_driver name whichJon Smirl
2004-10-10Vladimir requested support so we can at least load r300 microcode forDave Airlie
2004-10-10Forgot to add the new MakefileJon Smirl
2004-10-10Make the test programs buildJon Smirl
2004-10-09cleanup VIA driver to look a bit like others before kernel mergeDave Airlie
2004-10-09fix up whitespacing in KconfigDave Airlie
2004-10-09Lindent the via stuff so I can include it in kernelDave Airlie
2004-10-09remove unused dma remnants that were gamma only - these could cause an oopsDave Airlie
2004-10-08Changed unsigned to uint32_t in some ioctl parameters. Introduced firstThomas Hellstrom
2004-10-08Fix refcount bug in stealth modeJon Smirl
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
opt">), DRM_MEM_MAGIC); if (!entry) return -ENOMEM; memset(entry, 0, sizeof(*entry)); entry->priv = priv; entry->hash_item.key = (unsigned long)magic; mutex_lock(&dev->struct_mutex); drm_ht_insert_item(&dev->magiclist, &entry->hash_item); list_add_tail(&entry->head, &dev->magicfree); mutex_unlock(&dev->struct_mutex); return 0; } /** * Remove a magic number. * * \param dev DRM device. * \param magic magic number. * * Searches and unlinks the entry in drm_device::magiclist with the magic * number hash key, while holding the drm_device::struct_mutex lock. */ static int drm_remove_magic(struct drm_device * dev, drm_magic_t magic) { struct drm_magic_entry *pt; struct drm_hash_item *hash; DRM_DEBUG("%d\n", magic); mutex_lock(&dev->struct_mutex); if (drm_ht_find_item(&dev->magiclist, (unsigned long)magic, &hash)) { mutex_unlock(&dev->struct_mutex); return -EINVAL; } pt = drm_hash_entry(hash, struct drm_magic_entry, hash_item); drm_ht_remove_item(&dev->magiclist, hash); list_del(&pt->head); mutex_unlock(&dev->struct_mutex); drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC); return 0; } /** * Get a unique magic number (ioctl). * * \param inode device inode. * \param file_priv DRM file private. * \param cmd command. * \param arg pointer to a resulting drm_auth structure. * \return zero on success, or a negative number on failure. * * If there is a magic number in drm_file::magic then use it, otherwise * searches an unique non-zero magic number and add it associating it with \p * file_priv. */ int drm_getmagic(struct drm_device *dev, void *data, struct drm_file *file_priv) { static drm_magic_t sequence = 0; static DEFINE_SPINLOCK(lock); struct drm_auth *auth = data; /* Find unique magic */ if (file_priv->magic) { auth->magic = file_priv->magic; } else { do { spin_lock(&lock); if (!sequence) ++sequence; /* reserve 0 */ auth->magic = sequence++; spin_unlock(&lock); } while (drm_find_file(dev, auth->magic)); file_priv->magic = auth->magic; drm_add_magic(dev, file_priv, auth->magic); } DRM_DEBUG("%u\n", auth->magic); return 0; } /** * Authenticate with a magic. * * \param inode device inode. * \param file_priv DRM file private. * \param cmd command. * \param arg pointer to a drm_auth structure. * \return zero if authentication successed, or a negative number otherwise. * * Checks if \p file_priv is associated with the magic number passed in \arg. */ int drm_authmagic(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_auth *auth = data; struct drm_file *file; DRM_DEBUG("%u\n", auth->magic); if ((file = drm_find_file(dev, auth->magic))) { file->authenticated = 1; drm_remove_magic(dev, auth->magic); return 0; } return -EINVAL; }