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 17 18 19 20 /* 21 * Cache Policy API. 22 */ 23 24 #ifndef _KBASE_CACHE_POLICY_H_ 25 #define _KBASE_CACHE_POLICY_H_ 26 27 #include "mali_kbase.h" 28 #include "mali_base_kernel.h" 29 30 /** 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 34 * 35 * Tells whether the CPU and GPU caches should be enabled or not for a specific 36 * region. 37 * This function can be modified to customize the cache policy depending on the 38 * flags and size of the region. 39 * 40 * Return: a combination of %KBASE_REG_CPU_CACHED and %KBASE_REG_GPU_CACHED 41 * depending on the cache policy 42 */ 43 u32 kbase_cache_enabled(u32 flags, u32 nr_pages); 44 45 #endif /* _KBASE_CACHE_POLICY_H_ */ 46