MALI: rockchip: upgrade midgard DDK to r14p0-01rel0
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / midgard / backend / gpu / mali_kbase_pm_demand.c
index 4e5b79c9c448f65e5a8672ed853041e12a633a5a..81322fd0dd1757fdd9f51b1546ed7c42ca0dd21e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * (C) COPYRIGHT 2010-2015 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2010-2016 ARM Limited. All rights reserved.
  *
  * This program is free software and is provided to you under the terms of the
  * GNU General Public License version 2 as published by the Free Software
@@ -17,8 +17,7 @@
 
 
 
-/**
- * @file mali_kbase_pm_demand.c
+/*
  * A simple demand based power management policy
  */
 
@@ -37,7 +36,9 @@ static u64 demand_get_core_mask(struct kbase_device *kbdev)
 
 static bool demand_get_core_active(struct kbase_device *kbdev)
 {
-       if (0 == kbdev->pm.active_count)
+       if (0 == kbdev->pm.active_count && !(kbdev->shader_needed_bitmap |
+                       kbdev->shader_inuse_bitmap) && !kbdev->tiler_needed_cnt
+                       && !kbdev->tiler_inuse_cnt)
                return false;
 
        return true;
@@ -53,8 +54,8 @@ static void demand_term(struct kbase_device *kbdev)
        CSTD_UNUSED(kbdev);
 }
 
-/**
- * The @ref struct kbase_pm_policy structure for the demand power policy.
+/*
+ * The struct kbase_pm_policy structure for the demand power policy.
  *
  * This is the static structure that defines the demand power policy's callback
  * and name.