power: Prepare for power profile support
* Add support for system performance profiles and CPU boost.
* Uses mpctl to configure the CPUs in the appropriate modes.
* Implement binderized Lineage power HAL.
Author: Steve Kondik <shade@chemlab.org>
Date: Sat May 17 03:37:53 2014 -0700
power: Add support for CPU boost hint
Change-Id: I07c3e8daf8a5f3b568e27334f26d4ba8f4cf40c4
Author: Steve Kondik <shade@chemlab.org>
Date: Mon May 19 17:26:34 2014 -0700
power: Add support for SET_PROFILE hints
* Add support for system performance profiles.
* Uses mpctl to configure the CPUs in the appropriate modes.
* PERFORMANCE = all cores at max
* POWER_SAVE = max two cores at non-turbo voltage
* If a custom profile is set, don't honor any other hints
* Clean up the code and firm up the locking.
Change-Id: Ie6acada805780c9ae6e6bc2002843aef638ca63b
Author: Steve Kondik <steve@cyngn.com>
Date: Tue Nov 3 03:27:42 2015 -0800
power: Update for PerformanceManager changes
* Undo damage caused by the previous patch which broke
all hint arguments. We were actually using these wrong to
begin with anyway.
* Add support for get_profile
* Clean up code
Change-Id: Ibc3f21bfb7aa46ec97b9b63d09737d4331a5a714
Change-Id: I71357fac7b72de427d5f755f7ed572615ea11675
diff --git a/power-helper.c b/power-helper.c
index c7aaf79..da544de 100644
--- a/power-helper.c
+++ b/power-helper.c
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
* Copyright (C) 2017 The Android Open Source Project
- * Copyright (C) 2017 The LineageOS Project
+ * Copyright (C) 2017-2018 The LineageOS Project
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -81,7 +81,6 @@
#endif
#endif
-#define ARRAY_SIZE(x) (sizeof((x))/sizeof((x)[0]))
#define LINE_SIZE 128
#ifdef LEGACY_STATS
@@ -319,11 +318,19 @@
case POWER_HINT_VIDEO_DECODE:
process_video_decode_hint(data);
break;
+ case POWER_HINT_SET_PROFILE:
+ ALOGI("set profile power hint not handled in power_hint_override");
+ break;
default:
break;
}
}
+int get_number_of_profiles()
+{
+ return 0;
+}
+
int __attribute__ ((weak)) set_interactive_override(int UNUSED(on))
{
return HINT_NONE;