summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangwook Lee <sangwook.lee@linaro.org>2012-03-29 12:17:24 +0100
committerTushar Behera <tushar.behera@linaro.org>2012-04-18 13:15:04 +0530
commita6c33c98a72b9511d086e4f21fc4ee3a3aa2735a (patch)
tree3ce037f255e59d856b04b024b4acabfda8bb37d8
parent00290fca7ee5b0c26e6f58ffd70c234678c60e61 (diff)
downloadlinux-topics-a6c33c98a72b9511d086e4f21fc4ee3a3aa2735a.tar.gz
origen: android: mali: Disable profiling of Mali L2 cache
Add patch into Origen When connecting the ARM Streamline Performance Analyzer to Snowball Android this will cause a board lock-up if the screen is static (Bug #961962). The cause of this appears to be a know issue with reading the L2 cache performance counters whilst the hardware block is powered down. As the current code is written to access these counters even when they have not been explicitly selected then this issue prevents Streamline being used reliably for any purpose. To workaround this bug, this patch disables support for the L2 cache counters in Mali. This has no effect on the operation of the cache. Signed-off-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org>
-rw-r--r--drivers/gpu/arm/mali/linux/mali_osk_profiling_gator.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/arm/mali/linux/mali_osk_profiling_gator.c b/drivers/gpu/arm/mali/linux/mali_osk_profiling_gator.c
index a3963678460..5c1618c2eb8 100644
--- a/drivers/gpu/arm/mali/linux/mali_osk_profiling_gator.c
+++ b/drivers/gpu/arm/mali/linux/mali_osk_profiling_gator.c
@@ -11,6 +11,8 @@
* Boston, MA 02110-1301, USA.
*/
+#define DONT_USE_L2_CACHE_COUNTERS /* These traces can cause lock-ups so disable them. */
+
#include <linux/module.h>
#include "mali_kernel_common.h"
@@ -19,7 +21,7 @@
#include "mali_osk_profiling.h"
#include "mali_linux_trace.h"
-#if defined(USING_MALI400_L2_CACHE)
+#if defined(USING_MALI400_L2_CACHE) && !defined(DONT_USE_L2_CACHE_COUNTERS)
#include "mali_kernel_l2_cache.h"
#endif /* USING_MALI400_L2_CACHE */
@@ -180,7 +182,7 @@ _mali_osk_errcode_t _mali_ukk_profiling_get_config(_mali_uk_profiling_get_config
*/
int _mali_profiling_set_event(u32 counter_id, s32 event_id)
{
-#if defined(USING_MALI400_L2_CACHE)
+#if defined(USING_MALI400_L2_CACHE) && !defined(DONT_USE_L2_CACHE_COUNTERS)
/*
* The L2 cache counters have special handling in the driver. Since we
* receive new event IDs for each counter one at a time, we need to know
@@ -224,7 +226,7 @@ int _mali_profiling_set_event(u32 counter_id, s32 event_id)
return 0;
}
-#if defined(USING_MALI400_L2_CACHE)
+#if defined(USING_MALI400_L2_CACHE) && !defined(DONT_USE_L2_CACHE_COUNTERS)
/**
* Called by gator.ko to retrieve the L2 cache counter values. The L2 cache
* counters are unique in that they are polled by gator, rather than being