3 * (C) COPYRIGHT 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.
21 * @file mali_kbase_cache_policy.h
25 #ifndef _KBASE_CACHE_POLICY_H_
26 #define _KBASE_CACHE_POLICY_H_
28 #include <malisw/mali_malisw.h>
29 #include "mali_kbase.h"
30 #include <kbase/mali_base_kernel.h>
33 * @brief Choose the cache policy for a specific region
35 * Tells whether the CPU and GPU caches should be enabled or not for a specific region.
36 * This function can be modified to customize the cache policy depending on the flags
37 * and size of the region.
39 * @param[in] flags flags describing attributes of the region
40 * @param[in] nr_pages total number of pages (backed or not) for the region
42 * @return a combination of KBASE_REG_CPU_CACHED and KBASE_REG_GPU_CACHED depending
45 u32 kbase_cache_enabled(u32 flags, u32 nr_pages);
47 #endif /* _KBASE_CACHE_POLICY_H_ */