summaryrefslogtreecommitdiff
path: root/src/i830_memory.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2010-03-02 09:22:36 +0100
committerCarl Worth <cworth@cworth.org>2010-03-04 09:38:37 -0800
commit2a989aa057cee74154419fd0a4911ba1e95582cf (patch)
tree1e599b45234091218931afa4d9133455a833d5e7 /src/i830_memory.c
parentbf83b9a10254966cb73b24e08954154d4296dac3 (diff)
i830_memory: rip out the old video memory allocator
Besides the debug stuff the went away in the previous patch, this stuff was totally unused ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/i830_memory.c')
-rw-r--r--src/i830_memory.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 4202aa52..0d7ae438 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -206,13 +206,6 @@ void i830_reset_allocations(ScrnInfoPtr scrn)
intel_screen_private *intel = intel_get_screen_private(scrn);
int p;
- /* While there is any memory between the start and end markers, free it. */
- while (intel->memory_list->next->next != NULL) {
- i830_memory *mem = intel->memory_list->next;
-
- i830_free_memory(scrn, mem);
- }
-
/* Free any allocations in buffer objects */
while (intel->bo_list != NULL)
i830_free_memory(scrn, intel->bo_list);
@@ -226,65 +219,6 @@ void i830_reset_allocations(ScrnInfoPtr scrn)
intel->front_buffer = NULL;
}
-/**
- * Initialize's the driver's video memory allocator to allocate in the
- * given range.
- *
- * This sets up the kernel memory manager to manage as much of the memory
- * as we think it can, while leaving enough to us to fulfill our non-GEM
- * static allocations. Some of these exist because of the need for physical
- * addresses to reference.
- */
-Bool i830_allocator_init(ScrnInfoPtr scrn, unsigned long size)
-{
- intel_screen_private *intel = intel_get_screen_private(scrn);
- i830_memory *start, *end;
-
- start = xcalloc(1, sizeof(*start));
- if (start == NULL)
- return FALSE;
- start->name = xstrdup("start marker");
- if (start->name == NULL) {
- xfree(start);
- return FALSE;
- }
- end = xcalloc(1, sizeof(*end));
- if (end == NULL) {
- xfree(start->name);
- xfree(start);
- return FALSE;
- }
- end->name = xstrdup("end marker");
- if (end->name == NULL) {
- xfree(start->name);
- xfree(start);
- xfree(end);
- return FALSE;
- }
-
- start->size = 0;
- start->next = end;
- end->size = 0;
- end->prev = start;
-
- intel->memory_list = start;
-
- return TRUE;
-}
-
-void i830_allocator_fini(ScrnInfoPtr scrn)
-{
- intel_screen_private *intel = intel_get_screen_private(scrn);
-
- /* Free most of the allocations */
- i830_reset_allocations(scrn);
-
- /* Free the start/end markers */
- free(intel->memory_list->next);
- free(intel->memory_list);
- intel->memory_list = NULL;
-}
-
/* Allocates video memory at the given size, pitch, alignment and tile format.
*
* The memory will be bound automatically when the driver is in control of the
@@ -517,9 +451,6 @@ Bool i830_bind_all_memory(ScrnInfoPtr scrn)
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
int i;
- if (intel->memory_list == NULL)
- return TRUE;
-
for (i = 0; i < xf86_config->num_crtc; i++)
drmmode_crtc_set_cursor_bo(xf86_config->crtc[i],
intel->cursor_mem_argb[i]->bo);