summaryrefslogtreecommitdiff
path: root/bsd-core/drmP.h
AgeCommit message (Expand)Author
2006-09-06Use the DRM_INIT_WAITQUEUE argument (needed on Linux) to avoid a warning.Eric Anholt
2006-09-06Put the PCI device/vendor id in the drm_device_t.Eric Anholt
2006-09-06Add a typedef for u64.Eric Anholt
2006-04-18Reorder the DRM_*_AGP enum to match linux's numbers (oops). Fixes i915Eric Anholt
2005-11-08Initial port of savage to FreeBSD for the AGP and !ShadowStatus case. AddsEric Anholt
2005-11-08Fix FreeBSD DRM for latest MGA changes to agp support, which cleans thingsEric Anholt
2005-11-08Catch FreeBSD up to the pcie gart changes. Required minor modification toEric Anholt
2005-09-12Fix the spelling of DRM_AUTH so that the bsd core stuff builds again. NextEric Anholt
2005-09-03convert ioctl flags to use flags instead of separate intsDave Airlie
2005-08-26Previously, drm_get_resource_start() and drm_get_resource_len() wouldEric Anholt
2005-08-26[1] Fix BSD DRM for the nonroot changes. [2] Don't attempt to acquire theEric Anholt
2005-08-17add agp buffer tokenDave Airlie
2005-08-12Fix build after linux-side checkin of master/root-only split. Still onlyEric Anholt
2005-08-05Rename the driver hooks in the DRM to something a little moreEric Anholt
2005-08-04Fix the MGA driver on BSD by passing in the proper chipset flags to theEric Anholt
2005-07-20Add latest r300 support from r300.sf.net CVS. Patch submitted by volodya,Eric Anholt
2005-06-29Get the BSD DRM compiling again after MGA and mapping changes. Note thatEric Anholt
2005-06-14Adds support for PCI cards to MGA DRMIan Romanick
2005-06-06Add a few more bits of Tonnerre's NetBSD port (Still need to deal with theEric Anholt
2005-05-27Modify drm_driver::device_is_agp to return a tri-state value to indicateIan Romanick
2005-05-16Added device_is_agp callback to drm_driver. This function is called by theIan Romanick
2005-04-26Convert BSD code to mostly use bus_dma, the dma abstraction for dealingEric Anholt
2005-04-16Use /*- to begin license blocks in BSD code to reduce diffs against FreeBSDEric Anholt
2005-02-14Use fuword32 for DRM_GET_USER_UNCHECKED when available. May help on 64-bitEric Anholt
2005-02-08Close a race which could allow for privilege escalation by users with DRIEric Anholt
2005-02-05- Implement drm_initmap, and extend it with the resource number to helpEric Anholt
2004-11-07Refine the locking of the DRM. Most significant is covering the driverEric Anholt
2004-11-06Remove some core stuff that ended up being unnecessary.Eric Anholt
2004-11-06Get r128 basically working: Hook up the driver's dma ioctl, use the properEric Anholt
2004-11-06Hook the debug output up to a sysctl, so you can choose to enable atEric Anholt
2004-11-06Commit first pieces of port to OpenBSD, done by Martin Lexa (martin atEric Anholt
2004-11-06Commit WIP of BSD conversion to core model. Compiles for r128, radeon, butEric Anholt
2004-08-17Merged drmfntbl-0-0-1Dave Airlie
2004-07-06MFC as of 20040705: dev_t -> struct cdev * change.Eric Anholt
2004-05-09drm_hw_lock_t is now defined in drm.h, remove from here.Eric Anholt
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-11-05Remove buf_alloc which is unused since the locking commit.Eric Anholt
2003-11-04Memory layout transition:Michel Daenzer
2003-10-23- Introduce a new ioctl, DRM_IOCTL_SET_VERSION. This ioctl allows theEric Anholt
2003-10-20Clean up BSD MTRR handling. The NetBSD code is untested, but it's my bestEric Anholt
2003-10-19- SMPng lock the DRM. This is only partial -- there are a few code pathsEric Anholt
2003-10-17- Move IRQ functions from drm_dma.h to new drm_irq.h and disentangle themEric Anholt
2003-10-17- Converted Linux drivers to initialize DRM instances based on PCI IDs, notEric Anholt
2003-10-02Axe more old gamma DMA infrastructure.Eric Anholt
2003-08-29Add DRM(calloc), which is convenient, used by the new sis code, and takesEric Anholt
2003-08-19- Remove $FreeBSD$ tags as they weren't too useful and merges are now beingEric Anholt
2003-07-29IRQ code cleanup suggested by Linus TorvaldsMichel Daenzer
2003-07-25Compile fixes for recent 2.5/2.6 Linux kernels. I hope this doesn't breakMichel Daenzer
2003-05-16Support AGP bridges where the AGP aperture can't be accessed directly byMichel Daenzer
span class="hl kwb">static void compare_batch(struct drm_intel_decode *ctx, const char *batch_filename) { FILE *out = NULL; void *ptr, *ref_ptr, *batch_ptr; size_t size, ref_size, batch_size; const char *ref_suffix = "-ref.txt"; char *ref_filename; ref_filename = malloc(strlen(batch_filename) + strlen(ref_suffix) + 1); sprintf(ref_filename, "%s%s", batch_filename, ref_suffix); /* Read the batch and reference. */ read_file(batch_filename, &batch_ptr, &batch_size); read_file(ref_filename, &ref_ptr, &ref_size); /* Set up our decode output in memory, because I don't want to * figure out how to output to a file in a safe and sane way * inside of an automake project's test infrastructure. */ #ifdef HAVE_OPEN_MEMSTREAM out = open_memstream((char **)&ptr, &size); #else fprintf(stderr, "platform lacks open_memstream, skipping.\n"); exit(77); #endif drm_intel_decode_set_batch_pointer(ctx, batch_ptr, HW_OFFSET, batch_size / 4); drm_intel_decode_set_output_file(ctx, out); drm_intel_decode(ctx); if (strcmp(ref_ptr, ptr) != 0) { fprintf(stderr, "Decode mismatch with reference `%s'.\n", ref_filename); fprintf(stderr, "You can dump the new output using:\n"); fprintf(stderr, " test_decode \"%s\" -dump\n", batch_filename); exit(1); } fclose(out); free(ref_filename); free(ptr); } static uint16_t infer_devid(const char *batch_filename) { struct { const char *name; uint16_t devid; } chipsets[] = { { "830", 0x3577}, { "855", 0x3582}, { "945", 0x2772}, { "gen4", 0x2a02 }, { "gm45", 0x2a42 }, { "gen5", PCI_CHIP_ILD_G }, { "gen6", PCI_CHIP_SANDYBRIDGE_GT2 }, { "gen7", PCI_CHIP_IVYBRIDGE_GT2 }, { NULL, 0 }, }; int i; for (i = 0; chipsets[i].name != NULL; i++) { if (strstr(batch_filename, chipsets[i].name)) return chipsets[i].devid; } fprintf(stderr, "Couldn't guess chipset id from batch filename `%s'.\n", batch_filename); fprintf(stderr, "Must be contain one of:\n"); for (i = 0; chipsets[i].name != NULL; i++) { fprintf(stderr, " %s\n", chipsets[i].name); } exit(1); } int main(int argc, char **argv) { uint16_t devid; struct drm_intel_decode *ctx; if (argc < 2) usage(); devid = infer_devid(argv[1]); ctx = drm_intel_decode_context_alloc(devid); if (argc == 3) { if (strcmp(argv[2], "-dump") == 0) dump_batch(ctx, argv[1]); else usage(); } else { compare_batch(ctx, argv[1]); } drm_intel_decode_context_free(ctx); return 0; }