mali_kbase_cache_policy.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. *
  3. * (C) COPYRIGHT 2012-2013, 2015 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. /*
  16. * Cache Policy API.
  17. */
  18. #ifndef _KBASE_CACHE_POLICY_H_
  19. #define _KBASE_CACHE_POLICY_H_
  20. #include "mali_kbase.h"
  21. #include "mali_base_kernel.h"
  22. /**
  23. * kbase_cache_enabled - Choose the cache policy for a specific region
  24. * @flags: flags describing attributes of the region
  25. * @nr_pages: total number of pages (backed or not) for the region
  26. *
  27. * Tells whether the CPU and GPU caches should be enabled or not for a specific
  28. * region.
  29. * This function can be modified to customize the cache policy depending on the
  30. * flags and size of the region.
  31. *
  32. * Return: a combination of %KBASE_REG_CPU_CACHED and %KBASE_REG_GPU_CACHED
  33. * depending on the cache policy
  34. */
  35. u32 kbase_cache_enabled(u32 flags, u32 nr_pages);
  36. #endif // ifndef _KBASE_CACHE_POLICY_H_