summaryrefslogtreecommitdiff
path: root/power-libperfmgr/hidl
diff options
context:
space:
mode:
authorWei Wang <wvw@google.com>2020-10-21 12:15:30 -0700
committerWei Wang <wvw@google.com>2020-10-22 20:30:58 +0000
commitae9cb28b771ff1777d6545fe42e69f73c790713f (patch)
treeefee2dcf8e9bb4bf3f6471400eec67ac6bc33e41 /power-libperfmgr/hidl
parenteb3c6c079510f5494027899205a1e45a702ef48d (diff)
downloadpixel-ae9cb28b771ff1777d6545fe42e69f73c790713f.tar.gz
Power: add support for devices without display idle signals
To workaround b/141025174, adding support for devices without display idle signals. Also added a property to override idle display function. Besides the idle signal support, this CL also makes touch boost duration tunable through several new vendor properties. It also named display idle monitor thread and cleans out the obsolete HIDL Power HAL implementation. Bug: 168080943 Bug: 169065024 Bug: 171494137 Test: Boot and trace Change-Id: I76067d10958654d539624ec4cac8f346103e67bc
Diffstat (limited to 'power-libperfmgr/hidl')
-rw-r--r--power-libperfmgr/hidl/Power.cpp388
-rw-r--r--power-libperfmgr/hidl/Power.h90
-rw-r--r--power-libperfmgr/hidl/android.hardware.power@1.3-service.pixel-libperfmgr.rc26
-rw-r--r--power-libperfmgr/hidl/android.hardware.power@1.3-service.pixel.xml11
-rw-r--r--power-libperfmgr/hidl/device.mk5
-rw-r--r--power-libperfmgr/hidl/service.cpp59
6 files changed, 0 insertions, 579 deletions
diff --git a/power-libperfmgr/hidl/Power.cpp b/power-libperfmgr/hidl/Power.cpp
deleted file mode 100644
index 2b43b0f3..00000000
--- a/power-libperfmgr/hidl/Power.cpp
+++ /dev/null
@@ -1,388 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define ATRACE_TAG (ATRACE_TAG_POWER | ATRACE_TAG_HAL)
-#define LOG_TAG "android.hardware.power@1.3-service.pixel-libperfmgr"
-
-#include "Power.h"
-
-#include <mutex>
-
-#include <android-base/file.h>
-#include <android-base/logging.h>
-#include <android-base/properties.h>
-#include <android-base/stringprintf.h>
-#include <android-base/strings.h>
-
-#include <utils/Log.h>
-#include <utils/Trace.h>
-
-#include "AudioStreaming.h"
-#include "disp-power/DisplayLowPower.h"
-
-namespace android {
-namespace hardware {
-namespace power {
-namespace V1_3 {
-namespace implementation {
-
-using ::android::hardware::hidl_vec;
-using ::android::hardware::Return;
-using ::android::hardware::Void;
-using ::android::hardware::power::V1_0::Feature;
-using ::android::hardware::power::V1_0::Status;
-
-constexpr char kPowerHalStateProp[] = "vendor.powerhal.state";
-constexpr char kPowerHalAudioProp[] = "vendor.powerhal.audio";
-constexpr char kPowerHalInitProp[] = "vendor.powerhal.init";
-constexpr char kPowerHalRenderingProp[] = "vendor.powerhal.rendering";
-constexpr char kPowerHalConfigPath[] = "/vendor/etc/powerhint.json";
-
-static const std::map<enum CameraStreamingMode, std::string> kCamStreamingHint = {
- {CAMERA_STREAMING_OFF, "CAMERA_STREAMING_OFF"},
- {CAMERA_STREAMING, "CAMERA_STREAMING"},
- {CAMERA_STREAMING_1080P, "CAMERA_STREAMING_1080P"},
- {CAMERA_STREAMING_60FPS, "CAMERA_STREAMING_60FPS"},
- {CAMERA_STREAMING_4K, "CAMERA_STREAMING_4K"},
- {CAMERA_STREAMING_SECURE, "CAMERA_STREAMING_SECURE"}};
-
-Power::Power()
- : mHintManager(nullptr),
- mInteractionHandler(nullptr),
- mDisplayLowPower(nullptr),
- mVRModeOn(false),
- mSustainedPerfModeOn(false),
- mCameraStreamingMode(CAMERA_STREAMING_OFF),
- mReady(false) {
- mInitThread = std::thread([this]() {
- android::base::WaitForProperty(kPowerHalInitProp, "1");
- mHintManager = HintManager::GetFromJSON(kPowerHalConfigPath);
- if (!mHintManager) {
- LOG(FATAL) << "Invalid config: " << kPowerHalConfigPath;
- }
- mInteractionHandler = std::make_unique<InteractionHandler>(mHintManager);
- mInteractionHandler->Init();
- mDisplayLowPower = std::make_unique<DisplayLowPower>();
- mDisplayLowPower->Init();
- std::string state = android::base::GetProperty(kPowerHalStateProp, "");
- if (state == "CAMERA_STREAMING") {
- ALOGI("Initialize with CAMERA_STREAMING on");
- mHintManager->DoHint("CAMERA_STREAMING");
- mCameraStreamingMode = CAMERA_STREAMING;
- } else if (state == "CAMERA_STREAMING_1080P") {
- ALOGI("Initialize CAMERA_STREAMING_1080P on");
- mHintManager->DoHint("CAMERA_STREAMING_1080P");
- mCameraStreamingMode = CAMERA_STREAMING_1080P;
- } else if (state == "CAMERA_STREAMING_60FPS") {
- ALOGI("Initialize CAMERA_STREAMING_60FPS on");
- mHintManager->DoHint("CAMERA_STREAMING_60FPS");
- mCameraStreamingMode = CAMERA_STREAMING_60FPS;
- } else if (state == "CAMERA_STREAMING_4K") {
- ALOGI("Initialize with CAMERA_STREAMING_4K on");
- mHintManager->DoHint("CAMERA_STREAMING_4K");
- mCameraStreamingMode = CAMERA_STREAMING_4K;
- } else if (state == "CAMERA_STREAMING_SECURE") {
- ALOGI("Initialize with CAMERA_STREAMING_SECURE on");
- mHintManager->DoHint("CAMERA_STREAMING_SECURE");
- mCameraStreamingMode = CAMERA_STREAMING_SECURE;
- } else if (state == "SUSTAINED_PERFORMANCE") {
- ALOGI("Initialize with SUSTAINED_PERFORMANCE on");
- mHintManager->DoHint("SUSTAINED_PERFORMANCE");
- mSustainedPerfModeOn = true;
- } else if (state == "VR_MODE") {
- ALOGI("Initialize with VR_MODE on");
- mHintManager->DoHint("VR_MODE");
- mVRModeOn = true;
- } else if (state == "VR_SUSTAINED_PERFORMANCE") {
- ALOGI("Initialize with SUSTAINED_PERFORMANCE and VR_MODE on");
- mHintManager->DoHint("VR_SUSTAINED_PERFORMANCE");
- mSustainedPerfModeOn = true;
- mVRModeOn = true;
- } else {
- ALOGI("Initialize PowerHAL");
- }
-
- state = android::base::GetProperty(kPowerHalAudioProp, "");
- if (state == "AUDIO_LOW_LATENCY") {
- ALOGI("Initialize with AUDIO_LOW_LATENCY on");
- mHintManager->DoHint("AUDIO_LOW_LATENCY");
- }
-
- state = android::base::GetProperty(kPowerHalRenderingProp, "");
- if (state == "EXPENSIVE_RENDERING") {
- ALOGI("Initialize with EXPENSIVE_RENDERING on");
- mHintManager->DoHint("EXPENSIVE_RENDERING");
- }
- // Now start to take powerhint
- mReady.store(true);
- ALOGI("PowerHAL ready to process hints");
- });
- mInitThread.detach();
-}
-
-// Methods from ::android::hardware::power::V1_0::IPower follow.
-Return<void> Power::setInteractive(bool /* interactive */) {
- return Void();
-}
-
-Return<void> Power::powerHint(PowerHint_1_0 hint, int32_t data) {
- if (!mReady) {
- return Void();
- }
- ATRACE_INT(android::hardware::power::V1_0::toString(hint).c_str(), data);
- ALOGD_IF(hint != PowerHint_1_0::INTERACTION, "%s: %d",
- android::hardware::power::V1_0::toString(hint).c_str(), static_cast<int>(data));
- switch (hint) {
- case PowerHint_1_0::INTERACTION:
- if (mVRModeOn || mSustainedPerfModeOn) {
- ALOGV("%s: ignoring due to other active perf hints", __func__);
- } else {
- mInteractionHandler->Acquire(data);
- }
- break;
- case PowerHint_1_0::SUSTAINED_PERFORMANCE:
- if (data && !mSustainedPerfModeOn) {
- if (!mVRModeOn) { // Sustained mode only.
- mHintManager->DoHint("SUSTAINED_PERFORMANCE");
- } else { // Sustained + VR mode.
- mHintManager->EndHint("VR_MODE");
- mHintManager->DoHint("VR_SUSTAINED_PERFORMANCE");
- }
- mSustainedPerfModeOn = true;
- } else if (!data && mSustainedPerfModeOn) {
- mHintManager->EndHint("VR_SUSTAINED_PERFORMANCE");
- mHintManager->EndHint("SUSTAINED_PERFORMANCE");
- if (mVRModeOn) { // Switch back to VR Mode.
- mHintManager->DoHint("VR_MODE");
- }
- mSustainedPerfModeOn = false;
- }
- break;
- case PowerHint_1_0::VR_MODE:
- if (data && !mVRModeOn) {
- if (!mSustainedPerfModeOn) { // VR mode only.
- mHintManager->DoHint("VR_MODE");
- } else { // Sustained + VR mode.
- mHintManager->EndHint("SUSTAINED_PERFORMANCE");
- mHintManager->DoHint("VR_SUSTAINED_PERFORMANCE");
- }
- mVRModeOn = true;
- } else if (!data && mVRModeOn) {
- mHintManager->EndHint("VR_SUSTAINED_PERFORMANCE");
- mHintManager->EndHint("VR_MODE");
- if (mSustainedPerfModeOn) { // Switch back to sustained Mode.
- mHintManager->DoHint("SUSTAINED_PERFORMANCE");
- }
- mVRModeOn = false;
- }
- break;
- case PowerHint_1_0::LAUNCH:
- if (mVRModeOn || mSustainedPerfModeOn) {
- ALOGV("%s: ignoring due to other active perf hints", __func__);
- } else {
- if (data) {
- // Hint until canceled
- mHintManager->DoHint("LAUNCH");
- } else {
- mHintManager->EndHint("LAUNCH");
- }
- }
- break;
- case PowerHint_1_0::LOW_POWER:
- mDisplayLowPower->SetDisplayLowPower(static_cast<bool>(data));
- break;
- default:
- break;
- }
- return Void();
-}
-
-Return<void> Power::setFeature(Feature /*feature*/, bool /*activate*/) {
- // Nothing to do
- return Void();
-}
-
-Return<void> Power::getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_cb) {
- LOG(ERROR) << "getPlatformLowPowerStats not supported. Use IPowerStats HAL.";
- _hidl_cb({}, Status::SUCCESS);
- return Void();
-}
-
-// Methods from ::android::hardware::power::V1_1::IPower follow.
-Return<void> Power::getSubsystemLowPowerStats(getSubsystemLowPowerStats_cb _hidl_cb) {
- LOG(ERROR) << "getSubsystemLowPowerStats not supported. Use IPowerStats HAL.";
- _hidl_cb({}, Status::SUCCESS);
- return Void();
-}
-
-Return<void> Power::powerHintAsync(PowerHint_1_0 hint, int32_t data) {
- // just call the normal power hint in this oneway function
- return powerHint(hint, data);
-}
-
-// Methods from ::android::hardware::power::V1_2::IPower follow.
-Return<void> Power::powerHintAsync_1_2(PowerHint_1_2 hint, int32_t data) {
- if (!mReady) {
- return Void();
- }
-
- ATRACE_INT(android::hardware::power::V1_2::toString(hint).c_str(), data);
- ALOGD_IF(hint >= PowerHint_1_2::AUDIO_STREAMING, "%s: %d",
- android::hardware::power::V1_2::toString(hint).c_str(), static_cast<int>(data));
-
- switch (hint) {
- case PowerHint_1_2::AUDIO_LOW_LATENCY:
- if (data) {
- // Hint until canceled
- mHintManager->DoHint("AUDIO_LOW_LATENCY");
- } else {
- mHintManager->EndHint("AUDIO_LOW_LATENCY");
- }
- break;
- case PowerHint_1_2::AUDIO_STREAMING:
- if (mVRModeOn || mSustainedPerfModeOn) {
- ALOGV("%s: ignoring due to other active perf hints", __func__);
- } else {
- if (data == static_cast<int32_t>(AUDIO_STREAMING_HINT::AUDIO_STREAMING_ON)) {
- mHintManager->DoHint("AUDIO_STREAMING");
- } else if (data ==
- static_cast<int32_t>(AUDIO_STREAMING_HINT::AUDIO_STREAMING_OFF)) {
- mHintManager->EndHint("AUDIO_STREAMING");
- } else if (data == static_cast<int32_t>(AUDIO_STREAMING_HINT::TPU_BOOST_SHORT)) {
- mHintManager->DoHint("TPU_BOOST",
- std::chrono::milliseconds(TPU_HINT_DURATION_MS::SHORT));
- } else if (data == static_cast<int32_t>(AUDIO_STREAMING_HINT::TPU_BOOST_LONG)) {
- mHintManager->DoHint("TPU_BOOST",
- std::chrono::milliseconds(TPU_HINT_DURATION_MS::LONG));
- } else if (data == static_cast<int32_t>(AUDIO_STREAMING_HINT::TPU_BOOST_OFF)) {
- mHintManager->EndHint("TPU_BOOST");
- } else {
- ALOGE("AUDIO STREAMING INVALID DATA: %d", data);
- }
- }
- break;
- case PowerHint_1_2::CAMERA_LAUNCH:
- if (data > 0) {
- mHintManager->DoHint("CAMERA_LAUNCH");
- } else if (data == 0) {
- mHintManager->EndHint("CAMERA_LAUNCH");
- } else {
- ALOGE("CAMERA LAUNCH INVALID DATA: %d", data);
- }
- break;
- case PowerHint_1_2::CAMERA_STREAMING: {
- const enum CameraStreamingMode mode = static_cast<enum CameraStreamingMode>(data);
- if (mode < CAMERA_STREAMING_OFF || mode >= CAMERA_STREAMING_MAX) {
- ALOGE("CAMERA STREAMING INVALID Mode: %d", mode);
- break;
- }
-
- if (mCameraStreamingMode == mode)
- break;
-
- // turn it off first if any previous hint.
- if ((mCameraStreamingMode != CAMERA_STREAMING_OFF)) {
- const auto modeValue = kCamStreamingHint.at(mCameraStreamingMode);
- mHintManager->EndHint(modeValue);
- if ((mCameraStreamingMode != CAMERA_STREAMING_SECURE)) {
- // Boost 1s for tear down if not secure streaming use case
- mHintManager->DoHint("CAMERA_LAUNCH", std::chrono::seconds(1));
- }
- }
-
- if (mode != CAMERA_STREAMING_OFF) {
- const auto hintValue = kCamStreamingHint.at(mode);
- mHintManager->DoHint(hintValue);
- }
-
- mCameraStreamingMode = mode;
- const auto prop = (mCameraStreamingMode == CAMERA_STREAMING_OFF)
- ? ""
- : kCamStreamingHint.at(mode).c_str();
- if (!android::base::SetProperty(kPowerHalStateProp, prop)) {
- ALOGE("%s: could set powerHAL state %s property", __func__, prop);
- }
- break;
- }
- case PowerHint_1_2::CAMERA_SHOT:
- if (data > 0) {
- mHintManager->DoHint("CAMERA_SHOT", std::chrono::milliseconds(data));
- } else if (data == 0) {
- mHintManager->EndHint("CAMERA_SHOT");
- } else {
- ALOGE("CAMERA SHOT INVALID DATA: %d", data);
- }
- break;
- default:
- return powerHint(static_cast<PowerHint_1_0>(hint), data);
- }
- return Void();
-}
-
-// Methods from ::android::hardware::power::V1_3::IPower follow.
-Return<void> Power::powerHintAsync_1_3(PowerHint_1_3 hint, int32_t data) {
- if (!mReady) {
- return Void();
- }
-
- if (hint == PowerHint_1_3::EXPENSIVE_RENDERING) {
- ATRACE_INT(android::hardware::power::V1_3::toString(hint).c_str(), data);
- if (mVRModeOn || mSustainedPerfModeOn) {
- ALOGV("%s: ignoring due to other active perf hints", __func__);
- } else {
- if (data > 0) {
- mHintManager->DoHint("EXPENSIVE_RENDERING");
- } else {
- mHintManager->EndHint("EXPENSIVE_RENDERING");
- }
- }
- } else {
- return powerHintAsync_1_2(static_cast<PowerHint_1_2>(hint), data);
- }
- return Void();
-}
-
-constexpr const char *boolToString(bool b) {
- return b ? "true" : "false";
-}
-
-Return<void> Power::debug(const hidl_handle &handle, const hidl_vec<hidl_string> &) {
- if (handle != nullptr && handle->numFds >= 1 && mReady) {
- int fd = handle->data[0];
-
- std::string buf(android::base::StringPrintf(
- "HintManager Running: %s\n"
- "VRMode: %s\n"
- "CameraStreamingMode: %s\n"
- "SustainedPerformanceMode: %s\n",
- boolToString(mHintManager->IsRunning()), boolToString(mVRModeOn),
- kCamStreamingHint.at(mCameraStreamingMode).c_str(),
- boolToString(mSustainedPerfModeOn)));
- // Dump nodes through libperfmgr
- mHintManager->DumpToFd(fd);
- if (!android::base::WriteStringToFd(buf, fd)) {
- PLOG(ERROR) << "Failed to dump state to fd";
- }
- fsync(fd);
- }
- return Void();
-}
-
-} // namespace implementation
-} // namespace V1_3
-} // namespace power
-} // namespace hardware
-} // namespace android
diff --git a/power-libperfmgr/hidl/Power.h b/power-libperfmgr/hidl/Power.h
deleted file mode 100644
index 9bac4077..00000000
--- a/power-libperfmgr/hidl/Power.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef POWER_LIBPERFMGR_POWER_H_
-#define POWER_LIBPERFMGR_POWER_H_
-
-#include <atomic>
-#include <memory>
-#include <thread>
-
-#include <android/hardware/power/1.3/IPower.h>
-#include <hidl/MQDescriptor.h>
-#include <hidl/Status.h>
-#include <perfmgr/HintManager.h>
-
-#include "CameraMode.h"
-#include "disp-power/DisplayLowPower.h"
-#include "disp-power/InteractionHandler.h"
-
-namespace android {
-namespace hardware {
-namespace power {
-namespace V1_3 {
-namespace implementation {
-
-using ::InteractionHandler;
-using ::android::hardware::Return;
-using ::android::hardware::Void;
-using ::android::hardware::power::V1_0::Feature;
-using ::android::hardware::power::V1_3::IPower;
-using PowerHint_1_0 = ::android::hardware::power::V1_0::PowerHint;
-using PowerHint_1_2 = ::android::hardware::power::V1_2::PowerHint;
-using PowerHint_1_3 = ::android::hardware::power::V1_3::PowerHint;
-using ::android::perfmgr::HintManager;
-
-class Power : public IPower {
- public:
- // Methods from ::android::hardware::power::V1_0::IPower follow.
-
- Power();
-
- Return<void> setInteractive(bool /* interactive */) override;
- Return<void> powerHint(PowerHint_1_0 hint, int32_t data) override;
- Return<void> setFeature(Feature feature, bool activate) override;
- Return<void> getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_cb) override;
-
- // Methods from ::android::hardware::power::V1_1::IPower follow.
- Return<void> getSubsystemLowPowerStats(getSubsystemLowPowerStats_cb _hidl_cb) override;
- Return<void> powerHintAsync(PowerHint_1_0 hint, int32_t data) override;
-
- // Methods from ::android::hardware::power::V1_2::IPower follow.
- Return<void> powerHintAsync_1_2(PowerHint_1_2 hint, int32_t data) override;
-
- // Methods from ::android::hardware::power::V1_3::IPower follow.
- Return<void> powerHintAsync_1_3(PowerHint_1_3 hint, int32_t data) override;
-
- // Methods from ::android::hidl::base::V1_0::IBase follow.
- Return<void> debug(const hidl_handle &fd, const hidl_vec<hidl_string> &args) override;
-
- private:
- std::shared_ptr<HintManager> mHintManager;
- std::unique_ptr<InteractionHandler> mInteractionHandler;
- std::unique_ptr<DisplayLowPower> mDisplayLowPower;
- std::atomic<bool> mVRModeOn;
- std::atomic<bool> mSustainedPerfModeOn;
- std::atomic<enum CameraStreamingMode> mCameraStreamingMode;
- std::atomic<bool> mReady;
- std::thread mInitThread;
-};
-
-} // namespace implementation
-} // namespace V1_3
-} // namespace power
-} // namespace hardware
-} // namespace android
-
-#endif // POWER_LIBPERFMGR_POWER_H_
diff --git a/power-libperfmgr/hidl/android.hardware.power@1.3-service.pixel-libperfmgr.rc b/power-libperfmgr/hidl/android.hardware.power@1.3-service.pixel-libperfmgr.rc
deleted file mode 100644
index a59c5b69..00000000
--- a/power-libperfmgr/hidl/android.hardware.power@1.3-service.pixel-libperfmgr.rc
+++ /dev/null
@@ -1,26 +0,0 @@
-service vendor.power-hal-1-3 /vendor/bin/hw/android.hardware.power@1.3-service.pixel-libperfmgr
- class hal
- user root
- group system
- priority -20
- interface android.hardware.power@1.0::IPower default
- interface android.hardware.power@1.1::IPower default
- interface android.hardware.power@1.2::IPower default
- interface android.hardware.power@1.3::IPower default
-
-# restart powerHAL when framework died
-on property:init.svc.zygote=restarting && property:vendor.powerhal.state=*
- setprop vendor.powerhal.state ""
- setprop vendor.powerhal.audio ""
- setprop vendor.powerhal.rendering ""
- restart vendor.power-hal-1-3
-
-# restart powerHAL when cameraHAL died
-on property:init.svc.vendor.camera-provider-2-4=restarting && property:vendor.powerhal.state=CAMERA_STREAMING
- setprop vendor.powerhal.state ""
- restart vendor.power-hal-1-3
-
-# restart powerHAL when audioHAL died
-on property:init.svc.vendor.audio-hal-2-0=restarting && property:vendor.powerhal.audio=AUDIO_LOW_LATENCY
- setprop vendor.powerhal.audio ""
- restart vendor.power-hal-1-3
diff --git a/power-libperfmgr/hidl/android.hardware.power@1.3-service.pixel.xml b/power-libperfmgr/hidl/android.hardware.power@1.3-service.pixel.xml
deleted file mode 100644
index e52398c0..00000000
--- a/power-libperfmgr/hidl/android.hardware.power@1.3-service.pixel.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<manifest version="1.0" type="device">
- <hal format="hidl">
- <name>android.hardware.power</name>
- <transport>hwbinder</transport>
- <version>1.3</version>
- <interface>
- <name>IPower</name>
- <instance>default</instance>
- </interface>
- </hal>
-</manifest>
diff --git a/power-libperfmgr/hidl/device.mk b/power-libperfmgr/hidl/device.mk
deleted file mode 100644
index 5de6a2ce..00000000
--- a/power-libperfmgr/hidl/device.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-BOARD_SEPOLICY_DIRS += hardware/google/pixel-sepolicy/power-libperfmgr
-
-# power HAL
-PRODUCT_PACKAGES += \
- android.hardware.power@1.3-service.pixel-libperfmgr
diff --git a/power-libperfmgr/hidl/service.cpp b/power-libperfmgr/hidl/service.cpp
deleted file mode 100644
index 7bcc9078..00000000
--- a/power-libperfmgr/hidl/service.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "android.hardware.power@1.3-service.pixel-libperfmgr"
-
-#include <android/log.h>
-#include <hidl/HidlTransportSupport.h>
-
-#include "Power.h"
-
-using android::OK;
-using android::sp;
-using android::status_t;
-
-// libhwbinder:
-using android::hardware::configureRpcThreadpool;
-using android::hardware::joinRpcThreadpool;
-
-// Generated HIDL files
-using android::hardware::power::V1_3::IPower;
-using android::hardware::power::V1_3::implementation::Power;
-
-int main(int /* argc */, char ** /* argv */) {
- ALOGI("Power HAL Service 1.3 for Pixel is starting.");
-
- android::sp<IPower> service = new Power();
- if (service == nullptr) {
- ALOGE("Can not create an instance of Power HAL Iface, exiting.");
- return 1;
- }
- android::hardware::setMinSchedulerPolicy(service, SCHED_NORMAL, -20);
- configureRpcThreadpool(1, true /*callerWillJoin*/);
-
- status_t status = service->registerAsService();
- if (status != OK) {
- ALOGE("Could not register service for Power HAL Iface (%d), exiting.", status);
- return 1;
- }
-
- ALOGI("Power Service is ready");
- joinRpcThreadpool();
-
- // In normal operation, we don't expect the thread pool to exit
- ALOGE("Power Service is shutting down");
- return 1;
-}