aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/arm/midgard/mali_kbase_cache_policy.c
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2014-06-16 13:49:22 +0100
committerJon Medhurst <tixy@linaro.org>2014-06-16 13:49:22 +0100
commit1866f48b9f1337693acdba76916aa27e4acd6acf (patch)
tree11165b2ad7b8654292ffadcae9616500dcbd7774 /drivers/gpu/arm/midgard/mali_kbase_cache_policy.c
parentc7c76a7898c8f7484c8493796299a400171ecff0 (diff)
parent266df09df6ab7cc29cc252989d38c27e3380bc02 (diff)
Merge branch 'lsk-3.10-armlt-mali' into integration-lsk-3.10-juno-androidlsk-3.10-armlt-juno-20140616
Conflicts: linaro/configs/vexpress64.conf
Diffstat (limited to 'drivers/gpu/arm/midgard/mali_kbase_cache_policy.c')
-rw-r--r--drivers/gpu/arm/midgard/mali_kbase_cache_policy.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/drivers/gpu/arm/midgard/mali_kbase_cache_policy.c b/drivers/gpu/arm/midgard/mali_kbase_cache_policy.c
new file mode 100644
index 000000000000..a1c3aa88307b
--- /dev/null
+++ b/drivers/gpu/arm/midgard/mali_kbase_cache_policy.c
@@ -0,0 +1,41 @@
+/*
+ *
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
+ *
+ * This program is free software and is provided to you under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation, and any use by you of this program is subject to the terms
+ * of such GNU licence.
+ *
+ * A copy of the licence is included with the program, and can also be obtained
+ * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+
+
+
+
+/**
+ * @file mali_kbase_cache_policy.h
+ * Cache Policy API.
+ */
+
+#include "mali_kbase_cache_policy.h"
+
+/*
+ * The output flags should be a combination of the following values:
+ * KBASE_REG_CPU_CACHED: CPU cache should be enabled
+ */
+u32 kbase_cache_enabled(u32 flags, u32 nr_pages)
+{
+ u32 cache_flags = 0;
+
+ CSTD_UNUSED(nr_pages);
+
+ if (flags & BASE_MEM_CACHED_CPU)
+ cache_flags |= KBASE_REG_CPU_CACHED;
+
+ return cache_flags;
+}