mali_kbase_mem_lowlevel.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. *
  3. * (C) COPYRIGHT 2012-2014 ARM Limited. All rights reserved.
  4. *
  5. * This program is free software and is provided to you under the terms of the
  6. * GNU General Public License version 2 as published by the Free Software
  7. * Foundation, and any use by you of this program is subject to the terms
  8. * of such GNU licence.
  9. *
  10. * A copy of the licence is included with the program, and can also be obtained
  11. * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  12. * Boston, MA 02110-1301, USA.
  13. *
  14. */
  15. #ifndef _KBASE_MEM_LOWLEVEL_H
  16. #define _KBASE_MEM_LOWLEVEL_H
  17. #ifndef _KBASE_H_
  18. #error "Don't include this file directly, use mali_kbase.h instead"
  19. #endif
  20. #include <linux/dma-mapping.h>
  21. /**
  22. * @brief Flags for kbase_phy_allocator_pages_alloc
  23. */
  24. #define KBASE_PHY_PAGES_FLAG_DEFAULT (0) /** Default allocation flag */
  25. #define KBASE_PHY_PAGES_FLAG_CLEAR (1 << 0) /** Clear the pages after allocation */
  26. #define KBASE_PHY_PAGES_FLAG_POISON (1 << 1) /** Fill the memory with a poison value */
  27. #define KBASE_PHY_PAGES_SUPPORTED_FLAGS (KBASE_PHY_PAGES_FLAG_DEFAULT|KBASE_PHY_PAGES_FLAG_CLEAR|KBASE_PHY_PAGES_FLAG_POISON)
  28. #define KBASE_PHY_PAGES_POISON_VALUE 0xFD /** Value to fill the memory with when KBASE_PHY_PAGES_FLAG_POISON is set */
  29. enum kbase_sync_type {
  30. KBASE_SYNC_TO_CPU,
  31. KBASE_SYNC_TO_DEVICE
  32. };
  33. #endif // ifndef _KBASE_MEM_LOWLEVEL_H