From c4808e206bcc5b3d3c0baa2e6e5130e67b78152b Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sun, 18 Mar 2007 21:42:48 +1100 Subject: remove drm_lookup_map unused now --- linux-core/drm_memory.h | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'linux-core/drm_memory.h') diff --git a/linux-core/drm_memory.h b/linux-core/drm_memory.h index 32b89e5f..ab36b7d7 100644 --- a/linux-core/drm_memory.h +++ b/linux-core/drm_memory.h @@ -57,28 +57,6 @@ # endif #endif -/* - * Find the drm_map that covers the range [offset, offset+size). - */ -static inline drm_map_t *drm_lookup_map(unsigned long offset, - unsigned long size, drm_device_t * dev) -{ - struct list_head *list; - drm_map_list_t *r_list; - drm_map_t *map; - - list_for_each(list, &dev->maplist->head) { - r_list = (drm_map_list_t *) list; - map = r_list->map; - if (!map) - continue; - if (map->offset <= offset - && (offset + size) <= (map->offset + map->size)) - return map; - } - return NULL; -} - static inline void *agp_remap(unsigned long offset, unsigned long size, drm_device_t * dev) { -- cgit v1.2.3 From 27197d7836b913976f6b75005d1c0c926774825a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sun, 18 Mar 2007 21:45:07 +1100 Subject: deinline agp_remap along lines of kernel --- linux-core/drm_memory.h | 43 ------------------------------------------- 1 file changed, 43 deletions(-) (limited to 'linux-core/drm_memory.h') diff --git a/linux-core/drm_memory.h b/linux-core/drm_memory.h index ab36b7d7..03cb4d1d 100644 --- a/linux-core/drm_memory.h +++ b/linux-core/drm_memory.h @@ -57,49 +57,6 @@ # endif #endif -static inline void *agp_remap(unsigned long offset, unsigned long size, - drm_device_t * dev) -{ - unsigned long *phys_addr_map, i, num_pages = - PAGE_ALIGN(size) / PAGE_SIZE; - struct drm_agp_mem *agpmem; - struct page **page_map; - void *addr; - - size = PAGE_ALIGN(size); - -#ifdef __alpha__ - offset -= dev->hose->mem_space->start; -#endif - - for (agpmem = dev->agp->memory; agpmem; agpmem = agpmem->next) - if (agpmem->bound <= offset - && (agpmem->bound + (agpmem->pages << PAGE_SHIFT)) >= - (offset + size)) - break; - if (!agpmem) - return NULL; - - /* - * OK, we're mapping AGP space on a chipset/platform on which memory accesses by - * the CPU do not get remapped by the GART. We fix this by using the kernel's - * page-table instead (that's probably faster anyhow...). - */ - /* note: use vmalloc() because num_pages could be large... */ - page_map = vmalloc(num_pages * sizeof(struct page *)); - if (!page_map) - return NULL; - - phys_addr_map = - agpmem->memory->memory + (offset - agpmem->bound) / PAGE_SIZE; - for (i = 0; i < num_pages; ++i) - page_map[i] = pfn_to_page(phys_addr_map[i] >> PAGE_SHIFT); - addr = vmap(page_map, num_pages, VM_IOREMAP, PAGE_AGP); - vfree(page_map); - - return addr; -} - #else /* __OS_HAS_AGP */ static inline drm_map_t *drm_lookup_map(unsigned long offset, -- cgit v1.2.3 From 6c4428d40c7531a28aa405e3db407461d20a0110 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 19 Mar 2007 08:09:21 +1100 Subject: clean up more of inline functions agp_remap/drm_lookup_map --- linux-core/drm_memory.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'linux-core/drm_memory.h') diff --git a/linux-core/drm_memory.h b/linux-core/drm_memory.h index 03cb4d1d..5590c491 100644 --- a/linux-core/drm_memory.h +++ b/linux-core/drm_memory.h @@ -59,16 +59,4 @@ #else /* __OS_HAS_AGP */ -static inline drm_map_t *drm_lookup_map(unsigned long offset, - unsigned long size, drm_device_t * dev) -{ - return NULL; -} - -static inline void *agp_remap(unsigned long offset, unsigned long size, - drm_device_t * dev) -{ - return NULL; -} - #endif -- cgit v1.2.3