gpu midgard : fix oops if someone set freq in dts
authorxxm <xxm@rock-chips.com>
Fri, 11 Apr 2014 01:48:12 +0000 (09:48 +0800)
committerCody Xie <Cody.Xie@rock-chips.com>
Fri, 11 Apr 2014 01:48:37 +0000 (09:48 +0800)
drivers/gpu/arm/midgard/platform/rk/mali_kbase_dvfs.c

index 47e13fa1315514e8c266cbc0398d6343cd92006e..0a657b3c5e977b76a7b41c58a59e273fa2e4bd0d 100755 (executable)
@@ -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))