summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2001-02-09file gamma.h was initially added on branch mga-1-0-0-branch.Alan Hourihane
2001-02-02file dristat.c was initially added on branch mga-1-0-0-branch.Rik Faith
2001-02-01file drm_stub.h was initially added on branch mga-1-0-0-branch.Rik Faith
2001-01-29Corresponding sync with PCI GART updates.Gareth Hughes
2001-01-28Fix depth clears properly this time. Update all instances ofGareth Hughes
2001-01-26Client-side updates for drmRadeonClear(...), fixes color/depth bufferGareth Hughes
2001-01-24file mga_warp.c was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file mga_ucode.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file mga_drm.c was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file mga.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_vm.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_lock.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_memory.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_bufs.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_proc.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_fops.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_init.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_ioctl.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_drv.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_context.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_drawable.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_agpsupport.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_auth.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_dma.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24file drm_lists.h was initially added on branch mga-1-0-0-branch.Gareth Hughes
2001-01-24- Misc cleanups.Gareth Hughes
2001-01-23file ati_pcigart.h was initially added on branch ati-pcigart-0-0-1-branch.Jeff Hartmann
2001-01-23file ati_pcigart.c was initially added on branch ati-pcigart-0-0-1-branch.Jeff Hartmann
2001-01-18Fixed problem preventing compile on system w/o agpgart.Jeff Hartmann
2001-01-17file r128_pcigart.c was initially added on branch ati-pcigart-0-0-1-branch.Jeff Hartmann
2001-01-17file scatter.c was initially added on branch ati-pcigart-0-0-1-branch.Jeff Hartmann
2001-01-13Remove debug messages.Gareth Hughes
2001-01-11Makefile.linux was checking $(MACHINE) for 'i386' before building theKeith Whitwell
2001-01-08Merged tdfx-3-0-0Nathan Hand
2001-01-05Merged ati-5-0-0Kevin E Martin
2001-01-04Sync with Linux 2.4.0-prereleaseRik Faith
2000-12-30add blit ioctl, fix plnwt handlingKeith Whitwell
2000-12-15Update date information.Gareth Hughes
2000-12-13file bufs_tmp.h was initially added on branch mach64-0-0-1-branch.Gareth Hughes
2000-12-12- Fix nasty depth span bug. Drawable offset was not being added to pixelGareth Hughes
2000-12-05Import of XFree86 4.0.1gDavid Dawes
2000-12-04file mach64_dma.c was initially added on branch mach64-0-0-1-branch.Gareth Hughes
2000-12-04file mach64_state.c was initially added on branch mach64-0-0-1-branch.Gareth Hughes
2000-12-02file mach64_drm.h was initially added on branch mach64-0-0-1-branch.Gareth Hughes
2000-12-02Merged ati-4-1-1-branch into trunk.Gareth Hughes
2000-11-30Import of XFree86 4.0.1fDavid Dawes
2000-11-27file context_tmp.h was initially added on branch mach64-0-0-1-branch.Gareth Hughes
2000-11-27file driver_tmp.h was initially added on branch mach64-0-0-1-branch.Gareth Hughes
2000-11-27file mach64_drv.h was initially added on branch mach64-0-0-1-branch.Gareth Hughes
2000-11-21Integrated bug fix from David S. Miller (a wait queue removal bug)Jeff Hartmann
> drm_sg_mem *entry; unsigned long pages, i, j; DRM_DEBUG("%s\n", __FUNCTION__); if (!drm_core_check_feature(dev, DRIVER_SG)) return -EINVAL; if (dev->sg) return -EINVAL; entry = drm_alloc(sizeof(*entry), DRM_MEM_SGLISTS); if (!entry) return -ENOMEM; memset(entry, 0, sizeof(*entry)); pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; DRM_DEBUG("sg size=%ld pages=%ld\n", request->size, pages); entry->pages = pages; entry->pagelist = drm_alloc(pages * sizeof(*entry->pagelist), DRM_MEM_PAGES); if (!entry->pagelist) { drm_free(entry, sizeof(*entry), DRM_MEM_SGLISTS); return -ENOMEM; } memset(entry->pagelist, 0, pages * sizeof(*entry->pagelist)); entry->busaddr = drm_alloc(pages * sizeof(*entry->busaddr), DRM_MEM_PAGES); if (!entry->busaddr) { drm_free(entry->pagelist, entry->pages * sizeof(*entry->pagelist), DRM_MEM_PAGES); drm_free(entry, sizeof(*entry), DRM_MEM_SGLISTS); return -ENOMEM; } memset((void *)entry->busaddr, 0, pages * sizeof(*entry->busaddr)); entry->virtual = vmalloc_32(pages << PAGE_SHIFT); if (!entry->virtual) { drm_free(entry->busaddr, entry->pages * sizeof(*entry->busaddr), DRM_MEM_PAGES); drm_free(entry->pagelist, entry->pages * sizeof(*entry->pagelist), DRM_MEM_PAGES); drm_free(entry, sizeof(*entry), DRM_MEM_SGLISTS); return -ENOMEM; } /* This also forces the mapping of COW pages, so our page list * will be valid. Please don't remove it... */ memset(entry->virtual, 0, pages << PAGE_SHIFT); entry->handle = ScatterHandle((unsigned long)entry->virtual); DRM_DEBUG("sg alloc handle = %08lx\n", entry->handle); DRM_DEBUG("sg alloc virtual = %p\n", entry->virtual); for (i = (unsigned long)entry->virtual, j = 0; j < pages; i += PAGE_SIZE, j++) { entry->pagelist[j] = vmalloc_to_page((void *)i); if (!entry->pagelist[j]) goto failed; SetPageReserved(entry->pagelist[j]); } request->handle = entry->handle; dev->sg = entry; #if DEBUG_SCATTER /* Verify that each page points to its virtual address, and vice * versa. */ { int error = 0; for (i = 0; i < pages; i++) { unsigned long *tmp; tmp = page_address(entry->pagelist[i]); for (j = 0; j < PAGE_SIZE / sizeof(unsigned long); j++, tmp++) { *tmp = 0xcafebabe; } tmp = (unsigned long *)((u8 *) entry->virtual + (PAGE_SIZE * i)); for (j = 0; j < PAGE_SIZE / sizeof(unsigned long); j++, tmp++) { if (*tmp != 0xcafebabe && error == 0) { error = 1; DRM_ERROR("Scatter allocation error, " "pagelist does not match " "virtual mapping\n"); } } tmp = page_address(entry->pagelist[i]); for (j = 0; j < PAGE_SIZE / sizeof(unsigned long); j++, tmp++) { *tmp = 0; } } if (error == 0) DRM_ERROR("Scatter allocation matches pagelist\n"); } #endif return 0; failed: drm_sg_cleanup(entry); return -ENOMEM; } EXPORT_SYMBOL(drm_sg_alloc); int drm_sg_alloc_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_scatter_gather *request = data; return drm_sg_alloc(dev, request); } int drm_sg_free(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_scatter_gather *request = data; struct drm_sg_mem *entry; if (!drm_core_check_feature(dev, DRIVER_SG)) return -EINVAL; entry = dev->sg; dev->sg = NULL; if (!entry || entry->handle != request->handle) return -EINVAL; DRM_DEBUG("sg free virtual = %p\n", entry->virtual); drm_sg_cleanup(entry); return 0; }