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
This commit is contained in:
parent
e943cbd1a8
commit
40a340e68d
1 changed files with 0 additions and 4 deletions
|
@ -269,10 +269,6 @@ ndk::ScopedAStatus PowerHintSession::updateTargetWorkDuration(int64_t targetDura
|
||||||
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
|
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
|
||||||
}
|
}
|
||||||
ALOGV("update target duration: %" PRId64 " ns", targetDurationNanos);
|
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<int64_t>(mDescriptor->integral_error * ratio));
|
|
||||||
|
|
||||||
mDescriptor->duration = std::chrono::nanoseconds(targetDurationNanos);
|
mDescriptor->duration = std::chrono::nanoseconds(targetDurationNanos);
|
||||||
if (ATRACE_ENABLED()) {
|
if (ATRACE_ENABLED()) {
|
||||||
|
|
Loading…
Reference in a new issue