diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-30 14:26:27 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-30 14:26:27 -0800 |
commit | 63e8d9114dab88c101be2372cb1f83a4fe74d9c1 (patch) | |
tree | 424e8f1bdc1daf12ad83a64958156245cd9f1de8 /drivers/char/drm/drm_memory.c | |
parent | d1127e40e8d75cd3855e35424937c73d0bcec558 (diff) | |
parent | 55eb061326765b2d0489387cfb3fc7dbd244f917 (diff) |
Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm: remove drm_{alloc,free}_pages
drm: sis fix compile warning
drm: add new radeon PCI ids..
drm: read breadcrumb in IRQ handler
drm: fixup i915 breadcrumb read/write
drm: remove pointless checks in radeon_state
drm: fixup improper cast.
drm: rationalise some pci ids
drm: Add general-purpose packet for manipulating scratch registers (r300)
drm: rework radeon memory map (radeon 1.23)
drm: update r300 register names
drm: fixup PCI DMA support
Diffstat (limited to 'drivers/char/drm/drm_memory.c')
-rw-r--r-- | drivers/char/drm/drm_memory.c | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c index 8074771e348..dddf8de6614 100644 --- a/drivers/char/drm/drm_memory.c +++ b/drivers/char/drm/drm_memory.c @@ -79,65 +79,6 @@ void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area) return pt; } -/** - * Allocate pages. - * - * \param order size order. - * \param area memory area. (Not used.) - * \return page address on success, or zero on failure. - * - * Allocate and reserve free pages. - */ -unsigned long drm_alloc_pages(int order, int area) -{ - unsigned long address; - unsigned long bytes = PAGE_SIZE << order; - unsigned long addr; - unsigned int sz; - - address = __get_free_pages(GFP_KERNEL|__GFP_COMP, order); - if (!address) - return 0; - - /* Zero */ - memset((void *)address, 0, bytes); - - /* Reserve */ - for (addr = address, sz = bytes; - sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { - SetPageReserved(virt_to_page(addr)); - } - - return address; -} - -/** - * Free pages. - * - * \param address address of the pages to free. - * \param order size order. - * \param area memory area. (Not used.) - * - * Unreserve and free pages allocated by alloc_pages(). - */ -void drm_free_pages(unsigned long address, int order, int area) -{ - unsigned long bytes = PAGE_SIZE << order; - unsigned long addr; - unsigned int sz; - - if (!address) - return; - - /* Unreserve */ - for (addr = address, sz = bytes; - sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { - ClearPageReserved(virt_to_page(addr)); - } - - free_pages(address, order); -} - #if __OS_HAS_AGP /** Wrapper around agp_allocate_memory() */ DRM_AGP_MEM *drm_alloc_agp(drm_device_t * dev, int pages, u32 type) |