rk_fb: add extern screen open iommu, when dual screen display using iommu
[firefly-linux-kernel-4.4.55.git] / drivers / cpuquiet / driver.c
index fc83fa8cd02266a6c07eb13605e3018c803d4f60..097d2e36b79d8067bb9f1c6427d814600d51b2ff 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012 NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2012-2013 NVIDIA CORPORATION.  All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -106,12 +106,12 @@ static struct kobj_type ktype_cpu_stats = {
 };
 #endif
 
-int cpuquiet_quiesence_cpu(unsigned int cpunumber)
+int cpuquiet_quiesence_cpu(unsigned int cpunumber, bool sync)
 {
        int err = -EPERM;
 
        if (cpuquiet_curr_driver && cpuquiet_curr_driver->quiesence_cpu)
-               err = cpuquiet_curr_driver->quiesence_cpu(cpunumber);
+               err = cpuquiet_curr_driver->quiesence_cpu(cpunumber, sync);
 
 #ifdef CONFIG_CPUQUIET_STATS
        if (!err)
@@ -122,12 +122,12 @@ int cpuquiet_quiesence_cpu(unsigned int cpunumber)
 }
 EXPORT_SYMBOL(cpuquiet_quiesence_cpu);
 
-int cpuquiet_wake_cpu(unsigned int cpunumber)
+int cpuquiet_wake_cpu(unsigned int cpunumber, bool sync)
 {
        int err = -EPERM;
 
        if (cpuquiet_curr_driver && cpuquiet_curr_driver->wake_cpu)
-               err = cpuquiet_curr_driver->wake_cpu(cpunumber);
+               err = cpuquiet_curr_driver->wake_cpu(cpunumber, sync);
 
 #ifdef CONFIG_CPUQUIET_STATS
        if (!err)
@@ -197,10 +197,10 @@ void cpuquiet_unregister_driver(struct cpuquiet_driver *drv)
                return;
        }
 
-       /* stop current governor first */
-       cpuquiet_switch_governor(NULL);
-
        mutex_lock(&cpuquiet_lock);
+
+       /* Stop current governor first */
+       cpuquiet_switch_governor(NULL);
        cpuquiet_curr_driver = NULL;
 
        for_each_possible_cpu(cpu) {