From 2dc00ccb2f6a03df89d7cf98d2e956952561d89b Mon Sep 17 00:00:00 2001 From: xxm Date: Fri, 11 Apr 2014 11:56:41 +0800 Subject: [PATCH] rk3288 midgard:optimize gpu frequency scaling --- drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c | 2 +- drivers/gpu/arm/midgard/platform/rk/mali_kbase_dvfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c b/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c index 237c75fe7c34..15c6708c863e 100755 --- a/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c +++ b/drivers/gpu/arm/midgard/platform/rk/mali_kbase_config_rk.c @@ -233,7 +233,7 @@ static void pm_callback_runtime_off(kbase_device *kbdev) { kbase_platform_clock_off(kbdev); #ifdef CONFIG_MALI_MIDGARD_DVFS - if (kbase_platform_dvfs_enable(false, MALI_DVFS_CURRENT_FREQ)!= MALI_TRUE) + if (kbase_platform_dvfs_enable(false, p_mali_dvfs_infotbl[0].clock)!= MALI_TRUE) printk("[err] disabling dvfs is faled\n"); #endif } diff --git a/drivers/gpu/arm/midgard/platform/rk/mali_kbase_dvfs.c b/drivers/gpu/arm/midgard/platform/rk/mali_kbase_dvfs.c index 0a657b3c5e97..8e371b6f59e5 100755 --- a/drivers/gpu/arm/midgard/platform/rk/mali_kbase_dvfs.c +++ b/drivers/gpu/arm/midgard/platform/rk/mali_kbase_dvfs.c @@ -120,8 +120,8 @@ static void mali_dvfs_event_proc(struct work_struct *w) BUG_ON(dvfs_status->step >= MALI_DVFS_STEP); } - else if((dvfs_status->step > 0) && (dvfs_status->utilisation < mali_dvfs_infotbl[dvfs_status->step].min_threshold)) - //else if((dvfs_status->step > 0) && (platform->time_tick == MALI_DVFS_TIME_INTERVAL) && (platform->utilisation < mali_dvfs_infotbl[dvfs_status->step].min_threshold)) + //else if((dvfs_status->step > 0) && (dvfs_status->utilisation < mali_dvfs_infotbl[dvfs_status->step].min_threshold)) + else if((dvfs_status->step > 0) && (platform->time_tick == MALI_DVFS_TIME_INTERVAL) && (platform->utilisation < mali_dvfs_infotbl[dvfs_status->step].min_threshold)) { BUG_ON(dvfs_status->step <= 0); dvfs_status->step--; -- 2.34.1