rk: ion: resolve build err
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / t6xx / kbase / src / common / mali_kbase_cache_policy.h
1 /*
2  *
3  * (C) COPYRIGHT 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
17
18
19
20 /**
21  * @file mali_kbase_cache_policy.h
22  * Cache Policy API.
23  */
24
25 #ifndef _KBASE_CACHE_POLICY_H_
26 #define _KBASE_CACHE_POLICY_H_
27
28 #include <malisw/mali_malisw.h>
29 #include "mali_kbase.h"
30 #include <kbase/mali_base_kernel.h>
31
32 /**
33  * @brief Choose the cache policy for a specific region
34  *
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.
38  *
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
41  *
42  * @return a combination of KBASE_REG_CPU_CACHED and KBASE_REG_GPU_CACHED depending
43  * on the cache policy
44  */
45 u32 kbase_cache_enabled(u32 flags, u32 nr_pages);
46
47 #endif                          /* _KBASE_CACHE_POLICY_H_ */