vram.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  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. #ifndef __OMAP_VRAM_H__
  21. #define __OMAP_VRAM_H__
  22. #include <linux/types.h>
  23. extern int omap_vram_add_region(unsigned long paddr, size_t size);
  24. extern int omap_vram_free(unsigned long paddr, size_t size);
  25. extern int omap_vram_alloc(size_t size, unsigned long *paddr);
  26. extern int omap_vram_reserve(unsigned long paddr, size_t size);
  27. extern void omap_vram_get_info(unsigned long *vram, unsigned long *free_vram,
  28. unsigned long *largest_free_block);
  29. #ifdef CONFIG_OMAP2_VRAM
  30. extern void omap_vram_set_sdram_vram(u32 size, u32 start);
  31. extern void omap_vram_reserve_sdram_memblock(void);
  32. #else
  33. static inline void omap_vram_set_sdram_vram(u32 size, u32 start) { }
  34. static inline void omap_vram_reserve_sdram_memblock(void) { }
  35. #endif
  36. #endif