1 /*
2 * Copyright 2024 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include "TestHelper.h"
18
19 namespace aidl::google::hardware::power::impl::pixel {
20
makeMockConfig()21 ::android::perfmgr::AdpfConfig makeMockConfig() {
22 return ::android::perfmgr::AdpfConfig(
23 "REFRESH_60FPS", /* Name */
24 true, /* PID_On */
25 2.0, /* PID_Po */
26 1.0, /* PID_Pu */
27 0.0, /* PID_I */
28 200, /* PID_I_Init */
29 512, /* PID_I_High */
30 -30, /* PID_I_Low */
31 500.0, /* PID_Do */
32 0.0, /* PID_Du */
33 true, /* UclampMin_On */
34 162, /* UclampMin_Init */
35 480, /* UclampMin_High */
36 2, /* UclampMin_Low */
37 1, /* SamplingWindow_P */
38 0, /* SamplingWindow_I */
39 1, /* SamplingWindow_D */
40 166666660, /* ReportingRateLimitNs */
41 1.0, /* TargetTimeFactor */
42 15.0, /* StaleTimeFactor */
43 true, /* GpuBoost */
44 25000, /* GpuCapacityBoostMax */
45 0, /* GpuCapacityLoadUpHeadroom */
46 true, /* HeuristicBoost_On */
47 2, /* HBoostModerateJankThreshold */
48 4.0, /* HBoostOffMaxAvgDurRatio */
49 0.5, /* HBoostSevereJankPidPu */
50 8, /* HBoostSevereJankThreshold */
51 std::make_pair(480, 800), /* HBoostUclampMinCeilingRange */
52 std::make_pair(200, 400), /* HBoostUclampMinFloorRange */
53 1.2, /* JankCheckTimeFactor */
54 25, /* LowFrameRateThreshold */
55 300, /* MaxRecordsNum */
56 480, /* UclampMin_LoadUp */
57 480, /* UclampMin_LoadReset */
58 500, /* UclampMax_EfficientBase */
59 200); /* UclampMax_EfficientOffset */
60 }
61 } // namespace aidl::google::hardware::power::impl::pixel
62