// SPDX-License-Identifier: GPL-2.0
/*
- * Scheduler CPU power
+ * Scheduler CPU power allocation
*
- * Copyright (C) 2018 Samsung
+ * Copyright (C) 2018 Samsung Electronics co., Ltd
+ * Author: Lukasz Luba <l.luba@partner.samsung.com>
*/
#define pr_fmt(fmt) "SCHED_POWER: " fmt
/* check if we can go with higher freq for zone with a few devices*/
if (zone->single_cooling_dev) {
- /* we treat single-cooling-dev-zone as a guard for max temp */
+ /* We treat single-cooling-dev-zone as a guard for max temp
+ * and which does not disturb the power split for whole chip. */
cooling->max_single_state = target;
+ if (target < curr_state)
+ goto skip_change;
} else {
/* Lower 'target' state means higer frequency. Prevent going to
* higer freq if there was a limit due temperature value
cdev->updated = true;
mutex_unlock(&cdev->lock);
+skip_change:
return ret;
}