summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-04-03Make sure we ack irqs before we read a breadcrumb so thatThomas Hellstrom
breadcrumb updates that occur _AFTER_ we've read the breadcrumb really generates a new IRQ.
2007-04-03Evicted no-move buffers can get lost if they end up in anotherThomas Hellstrom
memory type than local.
2007-04-03Fix an oops when trying to clean a not yet initialized memory type.Thomas Hellstrom
2007-04-03Make sure CMA (Can't map aperture) pages are mapped uncached.Thomas Hellstrom
(Should really make this write-combined using PATs, at some point).
2007-04-02r300: Synchronize the register header file again.Oliver McFadden
It's a good idea to keep these synchronized; even though the DRM doesn't use all the defines, maintaining two different copies is prone to errors when the diff gets bigger.
2007-04-01nouveau: fix usage of PGRAPH_CTX_CONTROL on nv20+Matthieu Castet
http://gitweb.freedesktop.org/?p=mesa/drm.git;a=commitdiff;h=17985f07d68322519919a7f629a6d2d9bf3916ed could have broken some nvxx_graph code : it rename NV03_PGRAPH_CTX_CONTROL to NV10_PGRAPH_CTX_CONTROL, but forgot to update it in nvxx_graph file. Also when migrating init stuff in http://gitweb.freedesktop.org/?p=mesa/drm.git;a=commitdiff;h=674cefd4fe4b537a20a10edcb4ec5df55facca8e, NV04_PGRAPH_CTX_CONTROL is used everywhere but the old ddx code use NV_PGRAPH_CTX_CONTROL_NV04 or NV_PGRAPH_CTX_CONTROL.
2007-04-01nouveau : nv10 ctx switch fixMatthieu Castet
restoring NV10_PGRAPH_CTX_SWITCH1 now works
2007-04-01radeon: enable buffer managerDave Airlie
2007-04-01radeon: de-static irq function, fixup fence/bufferDave Airlie
2007-04-01copy over some files and reorg radeon to add ttm fencing not working yetDave Airlie
2007-04-01nouveau : set the correct PGRAPH_CTX_CONTROL registerMatthieu Castet
"5a072f32 (Stephane Marchesin 2007-02-03 04:57:06 +0100" broke nv10 ctx switch by setting wrong PGRAPH_CTX_CONTROL reg
2007-03-30Merge branch 'crestline-qa', adding support for the 965GM chipset.Eric Anholt
2007-03-30Merge branch 'origin'Eric Anholt
2007-03-29drm/bo: avoid oops if the memory manager for this type isn't initialisedDave Airlie
2007-03-29nouveau: fix nv04 context switches.Stephane Marchesin
2007-03-27drm/i915: set the bo up at firstopen time not after DMA initDave Airlie
This is required to use TTM to allocate the ring buffer.
2007-03-27drm/ttm: make sure dev_mapping is set-up for the first opener of the drmDave Airlie
This was causing an oops in my miniglx code to try and use a TTM-only setup.
2007-03-27Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestlineNian Wu
2007-03-26nouveau: move card initialisation into the drmBen Skeggs
The PGRAPH init for the various cards will need cleaning up at some point, a lot of the values written there are per-context state left over from the all the hardcoding done in the ddx. It's possible some cards get broken by this commit, let me know. Tested on: NV5, NV18, NV28, NV35, NV40, NV4E
2007-03-25Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestlineNian Wu
2007-03-24Catch up to new interrupt API, and retire FreeBSD 4.x support here.Eric Anholt
2007-03-24vm: cleanup drm_vm.c along lines of cleanups queued for kernelDave Airlie
2007-03-23Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestlineNian Wu
2007-03-23nouveau: rework nouveau_fifo_alloc() so the drm can create internal FIFOsBen Skeggs
2007-03-23cleanup more whitespace from ttm mergeDave Airlie
2007-03-23drm: remove second spinlock init for tasklet lockDave Airlie
2007-03-23nouveau: remove unused cruftBen Skeggs
2007-03-21Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestlineNian Wu
2007-03-21nouveau: support multiple channels per client (breaks drm interface)Ben Skeggs
2007-03-20Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestlineNian Wu
2007-03-20rename badly named defineDave Airlie
2007-03-19remove i830 referenceAlan Hourihane
2007-03-19Remove old i830 kernel driver.Alan Hourihane
2007-03-19Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestlineNian Wu
2007-03-19more return values fixupDave Airlie
2007-03-19fixup return values in drm ioctlDave Airlie
2007-03-19more whitespace issuesDave Airlie
2007-03-19cleanup ioctl expansion codeDave Airlie
2007-03-19oops missing elseDave Airlie
2007-03-19make drm fops const from kernelDave Airlie
2007-03-19use ARRAY_SIZEDave Airlie
2007-03-19more tab/space conversionDave Airlie
2007-03-19whitespace cleanup pending a kernel mergeDave Airlie
2007-03-19clean up more of inline functions agp_remap/drm_lookup_mapDave Airlie
2007-03-18deinline agp_remap along lines of kernelDave Airlie
2007-03-18remove drm_lookup_map unused nowDave Airlie
2007-03-14Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestlineNian Wu
2007-03-13r300: Renamed the CACHE_CTLSTAT values to include UNKNOWN in the name; notOliver McFadden
enough information is known about them to be sure as to what the values mean.
2007-03-13Merge git://proxy01.pd.intel.com:9419/git/mesa/drm into crestlineNian Wu
2007-03-13Add defines for the values written to R300_RB3D_ZCACHE_CTLSTAT.Oliver McFadden
Note that just like the values written to R300_RB3D_DSTCACHE_CTLSTAT these values are really unknown; ideally more reverse engineering should be done to determine what these values mean and when they should be set.
an> return 1; } int via_setDel(set_t * set, ITEM_TYPE item) { int alloc = set->alloc; int prev = -1; while (alloc != -1) { if (set->list[alloc].val == item) { if (prev != -1) set->list[prev].alloc_next = set->list[alloc].alloc_next; else set->alloc = set->list[alloc].alloc_next; break; } prev = alloc; alloc = set->list[alloc].alloc_next; } if (alloc == -1) return 0; set->list[alloc].free_next = set->free; set->free = alloc; set->list[alloc].alloc_next = -1; return 1; } /* setFirst -> setAdd -> setNext is wrong */ int via_setFirst(set_t * set, ITEM_TYPE * item) { if (set->alloc == -1) return 0; *item = set->list[set->alloc].val; set->trace = set->list[set->alloc].alloc_next; return 1; } int via_setNext(set_t * set, ITEM_TYPE * item) { if (set->trace == -1) return 0; *item = set->list[set->trace].val; set->trace = set->list[set->trace].alloc_next; return 1; } int via_setDestroy(set_t * set) { drm_free(set, sizeof(set_t), DRM_MEM_DRIVER); return 1; } #define ISFREE(bptr) ((bptr)->free) #define PRINTF(fmt, arg...) do{}while(0) #define fprintf(fmt, arg...) do{}while(0) void via_mmDumpMemInfo(memHeap_t * heap) { TMemBlock *p; PRINTF("Memory heap %p:\n", heap); if (heap == 0) PRINTF(" heap == 0\n"); else { p = (TMemBlock *) heap; while (p) { PRINTF(" Offset:%08x, Size:%08x, %c%c\n", p->ofs, p->size, p->free ? '.' : 'U', p->reserved ? 'R' : '.'); p = p->next; } } PRINTF("End of memory blocks\n"); } memHeap_t *via_mmInit(int ofs, int size) { PMemBlock blocks; if (size <= 0) return 0; blocks = (TMemBlock *) drm_calloc(1, sizeof(TMemBlock), DRM_MEM_DRIVER); if (blocks) { blocks->ofs = ofs; blocks->size = size; blocks->free = 1; return (memHeap_t *) blocks; } else return 0; } memHeap_t *via_mmAddRange(memHeap_t * heap, int ofs, int size) { PMemBlock blocks; blocks = (TMemBlock *) drm_calloc(2, sizeof(TMemBlock), DRM_MEM_DRIVER); if (blocks) { blocks[0].size = size; blocks[0].free = 1; blocks[0].ofs = ofs; blocks[0].next = &blocks[1]; /* Discontinuity - stops JoinBlock from trying to join non-adjacent * ranges. */ blocks[1].size = 0; blocks[1].free = 0; blocks[1].ofs = ofs + size; blocks[1].next = (PMemBlock) heap; return (memHeap_t *) blocks; } else return heap; } static TMemBlock *SliceBlock(TMemBlock * p, int startofs, int size, int reserved, int alignment) { TMemBlock *newblock; /* break left */ if (startofs > p->ofs) { newblock = (TMemBlock *) drm_calloc(1, sizeof(TMemBlock), DRM_MEM_DRIVER); newblock->ofs = startofs; newblock->size = p->size - (startofs - p->ofs); newblock->free = 1; newblock->next = p->next; p->size -= newblock->size; p->next = newblock; p = newblock; } /* break right */ if (size < p->size) { newblock = (TMemBlock *) drm_calloc(1, sizeof(TMemBlock), DRM_MEM_DRIVER); newblock->ofs = startofs + size; newblock->size = p->size - size; newblock->free = 1; newblock->next = p->next; p->size = size; p->next = newblock; } /* p = middle block */ p->align = alignment; p->free = 0; p->reserved = reserved; return p; } PMemBlock via_mmAllocMem(memHeap_t * heap, int size, int align2, int startSearch) { int mask, startofs, endofs; TMemBlock *p; if (!heap || align2 < 0 || size <= 0) return NULL; mask = (1 << align2) - 1; startofs = 0; p = (TMemBlock *) heap; while (p) { if (ISFREE(p)) { startofs = (p->ofs + mask) & ~mask; if (startofs < startSearch) startofs = startSearch; endofs = startofs + size; if (endofs <= (p->ofs + p->size)) break; } p = p->next; } if (!p) return NULL; p = SliceBlock(p, startofs, size, 0, mask + 1); p->heap = heap; return p; } static __inline__ int Join2Blocks(TMemBlock * p) { if (p->free && p->next && p->next->free) { TMemBlock *q = p->next; p->size += q->size; p->next = q->next; drm_free(q, sizeof(TMemBlock), DRM_MEM_DRIVER); return 1; } return 0; } int via_mmFreeMem(PMemBlock b) { TMemBlock *p, *prev; if (!b) return 0; if (!b->heap) { fprintf(stderr, "no heap\n"); return -1; } p = b->heap; prev = NULL; while (p && p != b) { prev = p; p = p->next; } if (!p || p->free || p->reserved) { if (!p) fprintf(stderr, "block not found in heap\n"); else if (p->free) fprintf(stderr, "block already free\n"); else fprintf(stderr, "block is reserved\n"); return -1; } p->free = 1; Join2Blocks(p); if (prev) Join2Blocks(prev); return 0; } int via_mmReserveMem(memHeap_t * heap, int offset, int size) { int endofs; TMemBlock *p; if (!heap || size <= 0) return -1; endofs = offset + size; p = (TMemBlock *) heap; while (p && p->ofs <= offset) { if (ISFREE(p) && endofs <= (p->ofs + p->size)) { SliceBlock(p, offset, size, 1, 1); return 0; } p = p->next; } return -1; } int via_mmFreeReserved(memHeap_t * heap, int offset) { TMemBlock *p, *prev; if (!heap) return -1; p = (TMemBlock *) heap; prev = NULL; while (p && p->ofs != offset) { prev = p; p = p->next; } if (!p || !p->reserved) return -1; p->free = 1; p->reserved = 0; Join2Blocks(p); if (prev) Join2Blocks(prev); return 0; } void via_mmDestroy(memHeap_t * heap) { TMemBlock *p, *q; if (!heap) return; p = (TMemBlock *) heap; while (p) { q = p->next; drm_free(p, sizeof(TMemBlock), DRM_MEM_DRIVER); p = q; } }