rk: ion: resolve build err
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / t6xx / kbase / src / common / mali_kbase_cache_policy.c
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 #include "mali_kbase_cache_policy.h"
26
27 /*
28  * The output flags should be a combination of the following values:
29  * KBASE_REG_CPU_CACHED: CPU cache should be enabled
30  */
31 u32 kbase_cache_enabled(u32 flags, u32 nr_pages)
32 {
33         u32 cache_flags = 0;
34
35         CSTD_UNUSED(nr_pages);
36
37         if (flags & BASE_MEM_CACHED_CPU)
38                 cache_flags |= KBASE_REG_CPU_CACHED;
39
40         return cache_flags;
41 }