From: xxm Date: Fri, 11 Apr 2014 01:48:12 +0000 (+0800) Subject: gpu midgard : fix oops if someone set freq in dts X-Git-Tag: firefly_0821_release~5574 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6b0bce2160f43aaa4eccbb17df2aa0139e79d4e2;p=firefly-linux-kernel-4.4.55.git gpu midgard : fix oops if someone set freq in dts --- 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 47e13fa13155..0a657b3c5e97 100755 --- a/drivers/gpu/arm/midgard/platform/rk/mali_kbase_dvfs.c +++ b/drivers/gpu/arm/midgard/platform/rk/mali_kbase_dvfs.c @@ -101,7 +101,7 @@ static void mali_dvfs_event_proc(struct work_struct *w) platform = (struct rk_context *)dvfs_status->kbdev->platform_context; spin_lock_irqsave(&mali_dvfs_spinlock, flags); - if (dvfs_status->utilisation > mali_dvfs_infotbl[dvfs_status->step].max_threshold) + if ((dvfs_status->utilisation > mali_dvfs_infotbl[dvfs_status->step].max_threshold) && (dvfs_status->step < MALI_DVFS_STEP-1)) { #if 0 if (dvfs_status->step==kbase_platform_dvfs_get_level(450))