summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
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
2004-09-05merge back bunch of whitespace and misc changes from kernelDave Airlie
2004-09-05bad code copy for alpha.. fix the member namesDave Airlie
2004-09-05make the AMD64 check a compat thingDave Airlie
2004-09-04Fixup OS_HAS_AGP/OS_HAS_MTRR along lines of patches going to kernel, asDave Airlie
2004-09-04doh.. that makes no sense.. thinko in removal of OS_HAS_AGPDave Airlie
2004-09-03file drm_core.h was initially added on branch drmlib-0-0-1-branch.Dave Airlie
2004-09-03file drm_agpsupport.c was initially added on branch drmlib-0-0-1-branch.Dave Airlie
2004-09-03file drm_core_memory.h was initially added on branch drmlib-0-0-1-branch.Dave Airlie
2004-09-03file drm_headers.h was initially added on branch drmlib-0-0-1-branch.Dave Airlie
2004-09-03file drm_memory.c was initially added on branch drmlib-0-0-1-branch.Dave Airlie
2004-09-03file drm_memory_debug.c was initially added on branch drmlib-0-0-1-branch.Dave Airlie
2004-09-03file drm_proc.c was initially added on branch drmlib-0-0-1-branch.Dave Airlie
s="hl opt">*dev, void *data, struct drm_file *file_priv) { drm_via_fb_t *fb = data; drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; int ret; mutex_lock(&dev->struct_mutex); ret = drm_sman_set_range(&dev_priv->sman, VIA_MEM_VIDEO, 0, fb->size >> VIA_MM_ALIGN_SHIFT); if (ret) { DRM_ERROR("VRAM memory manager initialisation error\n"); mutex_unlock(&dev->struct_mutex); return ret; } dev_priv->vram_initialized = 1; dev_priv->vram_offset = fb->offset; mutex_unlock(&dev->struct_mutex); DRM_DEBUG("offset = %u, size = %u\n", fb->offset, fb->size); return 0; } int via_final_context(struct drm_device *dev, int context) { drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; via_release_futex(dev_priv, context); #if defined(__linux__) /* Linux specific until context tracking code gets ported to BSD */ /* Last context, perform cleanup */ if (dev->ctx_count == 1 && dev->dev_private) { DRM_DEBUG("Last Context\n"); if (dev->irq) drm_irq_uninstall(dev); via_cleanup_futex(dev_priv); via_do_cleanup_map(dev); } #endif return 1; } void via_lastclose(struct drm_device *dev) { drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; if (!dev_priv) return; mutex_lock(&dev->struct_mutex); drm_sman_cleanup(&dev_priv->sman); dev_priv->vram_initialized = 0; dev_priv->agp_initialized = 0; mutex_unlock(&dev->struct_mutex); } int via_mem_alloc(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_via_mem_t *mem = data; int retval = 0; struct drm_memblock_item *item; drm_via_private_t *dev_priv = (drm_via_private_t *) dev->dev_private; unsigned long tmpSize; if (mem->type > VIA_MEM_AGP) { DRM_ERROR("Unknown memory type allocation\n"); return -EINVAL; } mutex_lock(&dev->struct_mutex); if (0 == ((mem->type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized : dev_priv->agp_initialized)) { DRM_ERROR ("Attempt to allocate from uninitialized memory manager.\n"); mutex_unlock(&dev->struct_mutex); return -EINVAL; } tmpSize = (mem->size + VIA_MM_ALIGN_MASK) >> VIA_MM_ALIGN_SHIFT; item = drm_sman_alloc(&dev_priv->sman, mem->type, tmpSize, 0, (unsigned long)file_priv); mutex_unlock(&dev->struct_mutex); if (item) { mem->offset = ((mem->type == VIA_MEM_VIDEO) ? dev_priv->vram_offset : dev_priv->agp_offset) + (item->mm-> offset(item->mm, item->mm_info) << VIA_MM_ALIGN_SHIFT); mem->index = item->user_hash.key; } else { mem->offset = 0; mem->size = 0; mem->index = 0; DRM_DEBUG("Video memory allocation failed\n"); retval = -ENOMEM; } return retval; } int via_mem_free(struct drm_device *dev, void *data, struct drm_file *file_priv) { drm_via_private_t *dev_priv = dev->dev_private; drm_via_mem_t *mem = data; int ret; mutex_lock(&dev->struct_mutex); ret = drm_sman_free_key(&dev_priv->sman, mem->index); mutex_unlock(&dev->struct_mutex); DRM_DEBUG("free = 0x%lx\n", mem->index); return ret; } void via_reclaim_buffers_locked(struct drm_device * dev, struct drm_file *file_priv) { drm_via_private_t *dev_priv = dev->dev_private; mutex_lock(&dev->struct_mutex); if (drm_sman_owner_clean(&dev_priv->sman, (unsigned long)file_priv)) { mutex_unlock(&dev->struct_mutex); return; } if (dev->driver->dma_quiescent) { dev->driver->dma_quiescent(dev); } drm_sman_owner_cleanup(&dev_priv->sman, (unsigned long)file_priv); mutex_unlock(&dev->struct_mutex); return; }