From 40a340e68db2835cdc6db980fc1c165a84e41823 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Thu, 18 Jul 2024 20:16:00 +0530 Subject: [PATCH] sm6375-common: power-libperfmgr: PowerHintSession: do not update PID controller when target changes There is no history kept in powerhint session, so let us just keep what we have in the PID controller and let new samples settle. Bug: 227003278 Test: Build Change-Id: Ia8b9a0be288389ec36ac35c668aca013d470c257 --- power-libperfmgr/PowerHintSession.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/power-libperfmgr/PowerHintSession.cpp b/power-libperfmgr/PowerHintSession.cpp index b7ef779..cd9c66d 100644 --- a/power-libperfmgr/PowerHintSession.cpp +++ b/power-libperfmgr/PowerHintSession.cpp @@ -269,10 +269,6 @@ ndk::ScopedAStatus PowerHintSession::updateTargetWorkDuration(int64_t targetDura return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } ALOGV("update target duration: %" PRId64 " ns", targetDurationNanos); - double ratio = - targetDurationNanos == 0 ? 1.0 : mDescriptor->duration.count() / targetDurationNanos; - mDescriptor->integral_error = - std::max(sPidIInit, static_cast(mDescriptor->integral_error * ratio)); mDescriptor->duration = std::chrono::nanoseconds(targetDurationNanos); if (ATRACE_ENABLED()) {