aboutsummaryrefslogtreecommitdiff
path: root/shared-core/sis_ds.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2005-02-01 11:08:31 +0000
committerDave Airlie <airlied@linux.ie>2005-02-01 11:08:31 +0000
commit0d6b7fcb79e9bf6f823b5802f8317056015faeec (patch)
treee1b1ed4dfbc01fde9b61cab0be66678da75222dd /shared-core/sis_ds.c
parent1dd948f280b52645b320ea0745ec48b8d98c9d9b (diff)
cleanup patch from Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'shared-core/sis_ds.c')
-rw-r--r--shared-core/sis_ds.c83
1 files changed, 0 insertions, 83 deletions
diff --git a/shared-core/sis_ds.c b/shared-core/sis_ds.c
index 132ae6b3..64daea99 100644
--- a/shared-core/sis_ds.c
+++ b/shared-core/sis_ds.c
@@ -193,30 +193,6 @@ int mmBlockInHeap(memHeap_t * heap, PMemBlock b)
return 0;
}
-/* Kludgey workaround for existing i810 server. Remove soon.
- */
-memHeap_t *mmAddRange(memHeap_t * heap, int ofs, int size)
-{
- PMemBlock blocks;
- blocks = (TMemBlock *) drm_calloc(2, sizeof(TMemBlock), DRM_MEM_DRIVER);
- if (blocks != NULL) {
- 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)
@@ -321,62 +297,3 @@ int mmFreeMem(PMemBlock b)
Join2Blocks(prev);
return 0;
}
-
-int mmReserveMem(memHeap_t * heap, int offset, int size)
-{
- int endofs;
- TMemBlock *p;
-
- if (heap == NULL || 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 mmFreeReserved(memHeap_t * heap, int offset)
-{
- TMemBlock *p, *prev;
-
- if (heap == NULL)
- return -1;
-
- p = (TMemBlock *) heap;
- prev = NULL;
- while (p != NULL && p->ofs != offset) {
- prev = p;
- p = p->next;
- }
- if (p == NULL || !p->reserved)
- return -1;
-
- p->free = 1;
- p->reserved = 0;
- Join2Blocks(p);
- if (prev != NULL)
- Join2Blocks(prev);
- return 0;
-}
-
-void mmDestroy(memHeap_t * heap)
-{
- TMemBlock *p, *q;
-
- if (heap == NULL)
- return;
-
- p = (TMemBlock *) heap;
- while (p != NULL) {
- q = p->next;
- drm_free(p, sizeof(TMemBlock), DRM_MEM_DRIVER);
- p = q;
- }
-}