From 808e227026278039fb47cbfdc587da2020bd3d12 Mon Sep 17 00:00:00 2001 From: Carter Cooper Date: Tue, 11 Jun 2013 12:22:25 -0600 Subject: [PATCH] msm: kgsl: Remove the skip counting code from the trustzone policy No need to turn the algorithm off now that there is explict binning. It's not a performance win and it confuses whether DCVS is opperational. Change-Id: Ifa1646e8dde0a792c3d22d5e1cf9e139b0363f08 Signed-off-by: Lucille Sylvester Signed-off-by: Carter Cooper --- drivers/gpu/msm/kgsl_pwrscale_trustzone.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/drivers/gpu/msm/kgsl_pwrscale_trustzone.c b/drivers/gpu/msm/kgsl_pwrscale_trustzone.c index cfc409ccd81..40649d2210d 100644 --- a/drivers/gpu/msm/kgsl_pwrscale_trustzone.c +++ b/drivers/gpu/msm/kgsl_pwrscale_trustzone.c @@ -28,8 +28,6 @@ struct tz_priv { int governor; - unsigned int no_switch_cnt; - unsigned int skip_cnt; struct kgsl_power_stats bin; unsigned int idle_dcvs; }; @@ -43,9 +41,6 @@ spinlock_t tz_lock; * frame length, but less than the idle timer. */ #define CEILING 50000 -#define SWITCH_OFF 200 -#define SWITCH_OFF_RESET_TH 40 -#define SKIP_COUNTER 500 #define TZ_RESET_ID 0x3 #define TZ_UPDATE_ID 0x4 #define TZ_INIT_ID 0x6 @@ -164,22 +159,6 @@ static void tz_idle(struct kgsl_device *device, struct kgsl_pwrscale *pwrscale) (priv->bin.total_time < FLOOR)) return; - /* If the GPU has stayed in turbo mode for a while, * - * stop writing out values. */ - if (pwr->active_pwrlevel == 0) { - if (priv->no_switch_cnt > SWITCH_OFF) { - priv->skip_cnt++; - if (priv->skip_cnt > SKIP_COUNTER) { - priv->no_switch_cnt -= SWITCH_OFF_RESET_TH; - priv->skip_cnt = 0; - } - return; - } - priv->no_switch_cnt++; - } else { - priv->no_switch_cnt = 0; - } - /* If there is an extended block of busy processing, * increase frequency. Otherwise run the normal algorithm. */ @@ -225,7 +204,6 @@ static void tz_sleep(struct kgsl_device *device, struct tz_priv *priv = pwrscale->priv; __secure_tz_entry2(TZ_RESET_ID, 0, 0); - priv->no_switch_cnt = 0; priv->bin.total_time = 0; priv->bin.busy_time = 0; }