blob: 4d65b7d06e6c38e9a90b1cf417edb94cf2d0d13c [file] [log] [blame]
Tomi Valkeinenafedec12009-08-07 12:01:55 +03001/*
2 * VRAM manager for OMAP
3 *
4 * Copyright (C) 2009 Nokia Corporation
5 * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21#ifndef __OMAP_VRAM_H__
22#define __OMAP_VRAM_H__
23
24#include <linux/types.h>
25
Tomi Valkeinenafedec12009-08-07 12:01:55 +030026extern int omap_vram_add_region(unsigned long paddr, size_t size);
27extern int omap_vram_free(unsigned long paddr, size_t size);
Tomi Valkeinen2a803c82011-04-18 13:18:20 +030028extern int omap_vram_alloc(size_t size, unsigned long *paddr);
Tomi Valkeinenafedec12009-08-07 12:01:55 +030029extern int omap_vram_reserve(unsigned long paddr, size_t size);
30extern void omap_vram_get_info(unsigned long *vram, unsigned long *free_vram,
31 unsigned long *largest_free_block);
32
33#ifdef CONFIG_OMAP2_VRAM
34extern void omap_vram_set_sdram_vram(u32 size, u32 start);
Tomi Valkeinenafedec12009-08-07 12:01:55 +030035
Russell King98864ff2010-05-22 23:59:11 +010036extern void omap_vram_reserve_sdram_memblock(void);
Tomi Valkeinenafedec12009-08-07 12:01:55 +030037#else
38static inline void omap_vram_set_sdram_vram(u32 size, u32 start) { }
Tomi Valkeinenafedec12009-08-07 12:01:55 +030039
Russell King98864ff2010-05-22 23:59:11 +010040static inline void omap_vram_reserve_sdram_memblock(void) { }
Tomi Valkeinenafedec12009-08-07 12:01:55 +030041#endif
42
43#endif