summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2007-01-08i830: complete fix for i830 mapsDave Airlie
2007-01-08nouveau: oopsBen Skeggs
2007-01-08nouveau: nv43 context stuffBen Skeggs
2007-01-08drm: remove drm_follow_page, and drm_ioremap and ioremapfreeChristoph Hellwig
2007-01-08fixup i810/i830 to use drm_core_ioremap instead of drm_ioremapDave Airlie
2007-01-08nouveau: avoid allocating vram that's used as instance memory.Ben Skeggs
2007-01-08nouveau: map pci resource 2 on >=nv40Ben Skeggs
2007-01-06Revert i915 drm driver name to i915; miniglx doesn't work otherwiseKeith Packard
2007-01-06Bump i915 minor for ARB_OC ioctlWang Zhenyu
2007-01-06i915: ARB_Occlusion_query(MMIO ioctl) support.Zou Nan hai
2007-01-06nouveau: get c51 doing glxgears without the binary driver's help.Ben Skeggs
2007-01-06nouveau: Use PMC_BOOT_0 to determine which ctx_voodoo to load.Ben Skeggs
2007-01-05nouveau: oops, we don't need OS_HAS_MTRR actually.Stephane Marchesin
2007-01-05Merge branch 'master' of git+ssh://marcheu@git.freedesktop.org/git/mesa/drmStephane Marchesin
2007-01-05nouveau: Add an mtrr over the whole FBStephane Marchesin
2007-01-05Merge branch 'master' of git+ssh://matc@git.freedesktop.org/git/mesa/drm/Matthieu Castet
2007-01-05Add basic pgraph context for nv10.Matthieu Castet
2007-01-05Cleanup the nv04 fifo code a bit.Stephane Marchesin
2007-01-02i915: Fix a DRM_ERROR that should be DRM_DEBUG.Michel Dänzer
2007-01-02Make git ignore Emacs style backup files and cscope files.Michel Dänzer
2007-01-02linux-core: Make git ignore generated module symbol version files.Michel Dänzer
2007-01-02nouveau: oops, forgot to free RAMIN..Ben Skeggs
2007-01-02nouveau: Hookup nv40_graph_init.Ben Skeggs
2007-01-02nouveau: Hook up grctx code for NV4x.Ben Skeggs
2007-01-02nouveau: Add nv40-specific PGRAPH code, not hooked up yet.Ben Skeggs
2007-01-02nouveau: Only clobber PFIFO if no channels are already alloc'dBen Skeggs
2007-01-01make build against 2.6.20 hopefullyDave Airlie
2007-01-01fixup permission along line of kernelDave Airlie
2006-12-28Add some new via chipsets.Thomas Hellstrom
2006-12-27Leftover from previous commit.Thomas Hellstrom
2006-12-27Allow for non-power-of-two texture pitch alignment.Thomas Hellstrom
2006-12-27Proper allocation of AGP pages for ttms.Thomas Hellstrom
2006-12-27nouveau: return the *actual* type of memory alloc'd to userspaceBen Skeggs
2006-12-26nouveau: Alloc cmdbuf for each channel individuallyBen Skeggs
2006-12-21Bug #9120.Thomas Hellstrom
2006-12-21Improve memory manager accounting printout formatting.Thomas Hellstrom
2006-12-21Fix buggy aligned allocations.Thomas Hellstrom
2006-12-21nouveau: save/restore endianness flag on FIFO switchBen Skeggs
2006-12-20Remove the stupid root_node field from the core memory manager.Thomas Hellstrom
2006-12-20Replace vmalloc_32.Thomas Hellstrom
2006-12-20Some via PCI posting flushes.Thomas Hellstrom
2006-12-20Merge branch 'nouveau-1'Dave Airlie
2006-12-20fixup symlinks via MakefileDave Airlie
2006-12-20add nouveau symlinks via gitDave Airlie
2006-12-20remove unused via/sis files from lk buildDave Airlie
2006-12-19Security fix. Zero pages before they are handed to user space.Thomas Hellstrom
2006-12-19Security fix. Zero pages before they are handed to user space.Thomas Hellstrom
2006-12-19Reclaim buffers locked fixup.Thomas Hellstrom
2006-12-19add kcalloc compat for before 2.6.10Dave Airlie
2006-12-19remove do munmap 4 argsDave Airlie
ass="hl opt">->handle); return 0; } /** * Free drawable ID and memory to store information about it. */ int drm_rmdraw(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_draw *draw = data; unsigned long irqflags; spin_lock_irqsave(&dev->drw_lock, irqflags); drm_free(drm_get_drawable_info(dev, draw->handle), sizeof(struct drm_drawable_info), DRM_MEM_BUFS); idr_remove(&dev->drw_idr, draw->handle); spin_unlock_irqrestore(&dev->drw_lock, irqflags); DRM_DEBUG("%d\n", draw->handle); return 0; } int drm_update_drawable_info(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_update_draw *update = data; unsigned long irqflags; struct drm_clip_rect *rects; struct drm_drawable_info *info; int err; info = idr_find(&dev->drw_idr, update->handle); if (!info) { info = drm_calloc(1, sizeof(*info), DRM_MEM_BUFS); if (!info) return -ENOMEM; if (IS_ERR(idr_replace(&dev->drw_idr, info, update->handle))) { DRM_ERROR("No such drawable %d\n", update->handle); drm_free(info, sizeof(*info), DRM_MEM_BUFS); return -EINVAL; } } switch (update->type) { case DRM_DRAWABLE_CLIPRECTS: if (update->num != info->num_rects) { rects = drm_alloc(update->num * sizeof(struct drm_clip_rect), DRM_MEM_BUFS); } else rects = info->rects; if (update->num && !rects) { DRM_ERROR("Failed to allocate cliprect memory\n"); err = -ENOMEM; goto error; } if (update->num && DRM_COPY_FROM_USER(rects, (struct drm_clip_rect __user *) (unsigned long)update->data, update->num * sizeof(*rects))) { DRM_ERROR("Failed to copy cliprects from userspace\n"); err = -EFAULT; goto error; } spin_lock_irqsave(&dev->drw_lock, irqflags); if (rects != info->rects) { drm_free(info->rects, info->num_rects * sizeof(struct drm_clip_rect), DRM_MEM_BUFS); } info->rects = rects; info->num_rects = update->num; spin_unlock_irqrestore(&dev->drw_lock, irqflags); DRM_DEBUG("Updated %d cliprects for drawable %d\n", info->num_rects, update->handle); break; default: DRM_ERROR("Invalid update type %d\n", update->type); return -EINVAL; } return 0; error: if (rects != info->rects) drm_free(rects, update->num * sizeof(struct drm_clip_rect), DRM_MEM_BUFS); return err; } /** * Caller must hold the drawable spinlock! */ struct drm_drawable_info *drm_get_drawable_info(struct drm_device *dev, drm_drawable_t id) { return idr_find(&dev->drw_idr, id); } EXPORT_SYMBOL(drm_get_drawable_info); static int drm_drawable_free(int idr, void *p, void *data) { struct drm_drawable_info *info = p; if (info) { drm_free(info->rects, info->num_rects * sizeof(struct drm_clip_rect), DRM_MEM_BUFS); drm_free(info, sizeof(*info), DRM_MEM_BUFS); } return 0; } void drm_drawable_free_all(struct drm_device *dev) { idr_for_each(&dev->drw_idr, drm_drawable_free, NULL); idr_remove_all(&dev->drw_idr); }