3 * (C) COPYRIGHT 2012-2013, 2015 ARM Limited. All rights reserved.
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
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.
24 #ifndef _KBASE_CACHE_POLICY_H_
25 #define _KBASE_CACHE_POLICY_H_
27 #include "mali_kbase.h"
28 #include "mali_base_kernel.h"
31 * kbase_cache_enabled - Choose the cache policy for a specific region
32 * @flags: flags describing attributes of the region
33 * @nr_pages: total number of pages (backed or not) for the region
35 * Tells whether the CPU and GPU caches should be enabled or not for a specific
37 * This function can be modified to customize the cache policy depending on the
38 * flags and size of the region.
40 * Return: a combination of %KBASE_REG_CPU_CACHED and %KBASE_REG_GPU_CACHED
41 * depending on the cache policy
43 u32 kbase_cache_enabled(u32 flags, u32 nr_pages);
45 #endif /* _KBASE_CACHE_POLICY_H_ */