summaryrefslogtreecommitdiff
path: root/shared-core/mga_dma.c
AgeCommit message (Expand)Author
2005-11-28Assert an MIT copyright on sis_drm.h, since one was lacking and I createdEric Anholt
2005-11-08Fix FreeBSD DRM for latest MGA changes to agp support, which cleans thingsEric Anholt
2005-11-03Converts the remaining drm_agp_foo functions to be a drm_agp_foo andIan Romanick
2005-10-20dma access also needs some workDave Airlie
2005-10-20the old init path needs to set WAGP_ENABLE by defaultDave Airlie
2005-10-14Doig a full clean up from mga_do_dma_bootstrap whenIan Romanick
2005-10-14Fixed a cut-and-paste bug that could cause an oops in mga_do_cleanup_dmaIan Romanick
2005-08-26- Don't try to allocate mappings of less than a PAGE_SIZE in MGA DMA code.Eric Anholt
2005-08-16add Egberts 32/64 bit patch (its in kernel already...)Dave Airlie
2005-08-05Rename the driver hooks in the DRM to something a little moreEric Anholt
2005-08-04Whitespace fixups.Eric Anholt
2005-08-04Fix the MGA driver on BSD by passing in the proper chipset flags to theEric Anholt
2005-06-28- Remove drm_initmap and replace its usage with drm_addmap. This reducesEric Anholt
2005-06-17fix up drm_alloc_agp to take a dev arg and not pass crappy agpgart aroundDave Airlie
2005-06-14Adds support for PCI cards to MGA DRMIan Romanick
2005-06-09Completely re-initialize DMA settingsIan Romanick
2005-06-03Move the deallocation of dev_private. Since dev_private is allocated whenIan Romanick
2005-05-21Change the MGA initialization and cleanup a bit. The dev_private structureIan Romanick
2005-02-01cleanup patch from Adrian Bunk <bunk@stusta.de>Dave Airlie
2004-09-30Lindent of core build. Drivers checked for no binary diffs. A few filesJon Smirl
2004-09-27First check in for DRM that splits core from personality modulesJon Smirl
2004-09-20remove HAVE_COUNTERSDave Airlie
2004-08-24Merged drmfntbl-0-0-2Dave Airlie
2004-08-23set pointers to NULL after freeing, remove some extra debuggingDave Airlie
2004-08-17Merged drmfntbl-0-0-1Dave Airlie
2004-07-25sync up with current 2.6 kernel bk tree - mostly __user annotationsDave Airlie
2003-12-16Don't ioremap the framebuffer area. The ioremapped area wasn't used byEric Anholt
2003-11-05- Tie the DRM to a specific device: setunique no longer succeeds when givenEric Anholt
2003-10-17- Move IRQ functions from drm_dma.h to new drm_irq.h and disentangle themEric Anholt
2003-05-16Support AGP bridges where the AGP aperture can't be accessed directly byMichel Daenzer
2003-04-26Ensure driver has been initialized (dev_private != NULL) before installingLeif Delgass
2003-04-21Check for NULL map before calling DRM(ioremapfree) on cleanup. Prevents anLeif Delgass
2003-03-28merged drm-filp-0-1-branchKeith Whitwell
2002-10-29updated e-mail addresses for Keith, Alan and JensJens Owen
2002-10-27s/udelay/DRM_UDELAY/Eric Anholt
2002-10-10Jonny Strom's mga_dma.c patchKeith Whitwell
2002-08-29standardize use of __FUNCTION__ (Linus)Keith Whitwell
2002-07-05merged bsd-3-0-0-branchAlan Hourihane
wd">ioctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &write); } int main(int argc, char **argv) { int fd; struct drm_i915_gem_create create; struct drm_i915_gem_mmap mmap; struct drm_gem_close unref; uint8_t expected[OBJECT_SIZE]; uint8_t buf[OBJECT_SIZE]; uint8_t *addr; int ret; int handle; fd = drm_open_matching("8086:*", 0); if (fd < 0) { fprintf(stderr, "failed to open intel drm device, skipping\n"); return 0; } memset(&mmap, 0, sizeof(mmap)); mmap.handle = 0x10101010; mmap.offset = 0; mmap.size = 4096; printf("Testing mmaping of bad object.\n"); ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap); assert(ret == -1 && errno == ENOENT); memset(&create, 0, sizeof(create)); create.size = OBJECT_SIZE; ret = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE, &create); assert(ret == 0); handle = create.handle; printf("Testing mmaping of newly created object.\n"); mmap.handle = handle; mmap.offset = 0; mmap.size = OBJECT_SIZE; ret = ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap); assert(ret == 0); addr = (uint8_t *)(uintptr_t)mmap.addr_ptr; printf("Testing contents of newly created object.\n"); memset(expected, 0, sizeof(expected)); assert(memcmp(addr, expected, sizeof(expected)) == 0); printf("Testing coherency of writes and mmap reads.\n"); memset(buf, 0, sizeof(buf)); memset(buf + 1024, 0x01, 1024); memset(expected + 1024, 0x01, 1024); ret = do_write(fd, handle, buf, 0, OBJECT_SIZE); assert(ret == 0); assert(memcmp(buf, addr, sizeof(buf)) == 0); printf("Testing that mapping stays after close\n"); unref.handle = handle; ret = ioctl(fd, DRM_IOCTL_GEM_CLOSE, &unref); assert(ret == 0); assert(memcmp(buf, addr, sizeof(buf)) == 0); printf("Testing unmapping\n"); munmap(addr, OBJECT_SIZE); close(fd); return 0; }