Lines Matching refs:offsets
61 auto offsets = mWorkDuration.getConfigsForRefreshRate(60_Hz); in TEST_F() local
63 EXPECT_EQ(currentOffsets, offsets); in TEST_F()
64 EXPECT_EQ(offsets.late.sfOffset, 6'166'667); in TEST_F()
65 EXPECT_EQ(offsets.late.appOffset, 2'333'334); in TEST_F()
67 EXPECT_EQ(offsets.late.sfWorkDuration, 10'500'000ns); in TEST_F()
68 EXPECT_EQ(offsets.late.appWorkDuration, 20'500'000ns); in TEST_F()
70 EXPECT_EQ(offsets.early.sfOffset, 666'667); in TEST_F()
71 EXPECT_EQ(offsets.early.appOffset, 833'334); in TEST_F()
73 EXPECT_EQ(offsets.early.sfWorkDuration, 16'000'000ns); in TEST_F()
74 EXPECT_EQ(offsets.early.appWorkDuration, 16'500'000ns); in TEST_F()
76 EXPECT_EQ(offsets.earlyGpu.sfOffset, 3'166'667); in TEST_F()
77 EXPECT_EQ(offsets.earlyGpu.appOffset, 15'500'001); in TEST_F()
79 EXPECT_EQ(offsets.earlyGpu.sfWorkDuration, 13'500'000ns); in TEST_F()
80 EXPECT_EQ(offsets.earlyGpu.appWorkDuration, 21'000'000ns); in TEST_F()
86 auto offsets = mWorkDuration.getConfigsForRefreshRate(90_Hz); in TEST_F() local
88 EXPECT_EQ(currentOffsets, offsets); in TEST_F()
89 EXPECT_EQ(offsets.late.sfOffset, 611'111); in TEST_F()
90 EXPECT_EQ(offsets.late.appOffset, 2'333'333); in TEST_F()
92 EXPECT_EQ(offsets.late.sfWorkDuration, 10'500'000ns); in TEST_F()
93 EXPECT_EQ(offsets.late.appWorkDuration, 20'500'000ns); in TEST_F()
95 EXPECT_EQ(offsets.early.sfOffset, -4'888'889); in TEST_F()
96 EXPECT_EQ(offsets.early.appOffset, 833'333); in TEST_F()
98 EXPECT_EQ(offsets.early.sfWorkDuration, 16'000'000ns); in TEST_F()
99 EXPECT_EQ(offsets.early.appWorkDuration, 16'500'000ns); in TEST_F()
101 EXPECT_EQ(offsets.earlyGpu.sfOffset, -2'388'889); in TEST_F()
102 EXPECT_EQ(offsets.earlyGpu.appOffset, 9'944'444); in TEST_F()
104 EXPECT_EQ(offsets.earlyGpu.sfWorkDuration, 13'500'000ns); in TEST_F()
105 EXPECT_EQ(offsets.earlyGpu.appWorkDuration, 21'000'000ns); in TEST_F()
111 auto validateOffsets = [](const auto& offsets, std::chrono::nanoseconds vsyncPeriod) { in TEST_F() argument
112 EXPECT_EQ(offsets.late.sfOffset, 1'000'000); in TEST_F()
113 EXPECT_EQ(offsets.late.appOffset, 1'000'000); in TEST_F()
115 EXPECT_EQ(offsets.late.sfWorkDuration, vsyncPeriod - 1'000'000ns); in TEST_F()
116 EXPECT_EQ(offsets.late.appWorkDuration, vsyncPeriod); in TEST_F()
118 EXPECT_EQ(offsets.early.sfOffset, 1'000'000); in TEST_F()
119 EXPECT_EQ(offsets.early.appOffset, 1'000'000); in TEST_F()
121 EXPECT_EQ(offsets.early.sfWorkDuration, vsyncPeriod - 1'000'000ns); in TEST_F()
122 EXPECT_EQ(offsets.early.appWorkDuration, vsyncPeriod); in TEST_F()
124 EXPECT_EQ(offsets.earlyGpu.sfOffset, 1'000'000); in TEST_F()
125 EXPECT_EQ(offsets.earlyGpu.appOffset, 1'000'000); in TEST_F()
127 EXPECT_EQ(offsets.earlyGpu.sfWorkDuration, vsyncPeriod - 1'000'000ns); in TEST_F()
128 EXPECT_EQ(offsets.earlyGpu.appWorkDuration, vsyncPeriod); in TEST_F()
130 EXPECT_EQ(offsets.hwcMinWorkDuration, 0ns); in TEST_F()
136 auto offsets = phaseOffsetsWithDefaultValues.getConfigsForRefreshRate(refreshRate); in TEST_F() local
137 EXPECT_EQ(currentOffsets, offsets); in TEST_F()
138 validateOffsets(offsets, std::chrono::nanoseconds(refreshRate.getPeriodNsecs())); in TEST_F()
146 auto offsets = mWorkDuration.getConfigsForRefreshRate(14.7_Hz); in TEST_F() local
148 EXPECT_EQ(offsets.late.sfOffset, 57'527'208); in TEST_F()
149 EXPECT_EQ(offsets.late.appOffset, 37'027'208); in TEST_F()
151 EXPECT_EQ(offsets.late.sfWorkDuration, 10'500'000ns); in TEST_F()
152 EXPECT_EQ(offsets.late.appWorkDuration, 20'500'000ns); in TEST_F()
154 EXPECT_EQ(offsets.early.sfOffset, 52'027'208); in TEST_F()
155 EXPECT_EQ(offsets.early.appOffset, 35'527'208); in TEST_F()
157 EXPECT_EQ(offsets.early.sfWorkDuration, 16'000'000ns); in TEST_F()
158 EXPECT_EQ(offsets.early.appWorkDuration, 16'500'000ns); in TEST_F()
160 EXPECT_EQ(offsets.earlyGpu.sfOffset, 54'527'208); in TEST_F()
161 EXPECT_EQ(offsets.earlyGpu.appOffset, 33'527'208); in TEST_F()
163 EXPECT_EQ(offsets.earlyGpu.sfWorkDuration, 13'500'000ns); in TEST_F()
164 EXPECT_EQ(offsets.earlyGpu.appWorkDuration, 21'000'000ns); in TEST_F()
203 auto offsets = mPhaseOffsets.getConfigsForRefreshRate(14.7_Hz); in TEST_F() local
205 EXPECT_EQ(offsets.late.sfOffset, 6'000'000); in TEST_F()
206 EXPECT_EQ(offsets.late.appOffset, 2'000'000); in TEST_F()
208 EXPECT_EQ(offsets.late.sfWorkDuration, 62'027'208ns); in TEST_F()
209 EXPECT_EQ(offsets.late.appWorkDuration, 72'027'208ns); in TEST_F()
211 EXPECT_EQ(offsets.early.sfOffset, 7'000'000); in TEST_F()
212 EXPECT_EQ(offsets.early.appOffset, 3'000'000); in TEST_F()
214 EXPECT_EQ(offsets.early.sfWorkDuration, 61'027'208ns); in TEST_F()
215 EXPECT_EQ(offsets.early.appWorkDuration, 72'027'208ns); in TEST_F()
217 EXPECT_EQ(offsets.earlyGpu.sfOffset, 8'000'000); in TEST_F()
218 EXPECT_EQ(offsets.earlyGpu.appOffset, 4'000'000); in TEST_F()
220 EXPECT_EQ(offsets.earlyGpu.sfWorkDuration, 60'027'208ns); in TEST_F()
221 EXPECT_EQ(offsets.earlyGpu.appWorkDuration, 72'027'208ns); in TEST_F()
225 auto offsets = mPhaseOffsets.getConfigsForRefreshRate(60_Hz); in TEST_F() local
227 EXPECT_EQ(offsets.late.sfOffset, 6'000'000); in TEST_F()
228 EXPECT_EQ(offsets.late.appOffset, 2'000'000); in TEST_F()
230 EXPECT_EQ(offsets.late.sfWorkDuration, 10'666'667ns); in TEST_F()
231 EXPECT_EQ(offsets.late.appWorkDuration, 20'666'667ns); in TEST_F()
233 EXPECT_EQ(offsets.early.sfOffset, 7'000'000); in TEST_F()
234 EXPECT_EQ(offsets.early.appOffset, 3'000'000); in TEST_F()
236 EXPECT_EQ(offsets.early.sfWorkDuration, 9'666'667ns); in TEST_F()
237 EXPECT_EQ(offsets.early.appWorkDuration, 20'666'667ns); in TEST_F()
239 EXPECT_EQ(offsets.earlyGpu.sfOffset, 8'000'000); in TEST_F()
240 EXPECT_EQ(offsets.earlyGpu.appOffset, 4'000'000); in TEST_F()
242 EXPECT_EQ(offsets.earlyGpu.sfWorkDuration, 8'666'667ns); in TEST_F()
243 EXPECT_EQ(offsets.earlyGpu.appWorkDuration, 20'666'667ns); in TEST_F()
247 auto offsets = mPhaseOffsets.getConfigsForRefreshRate(90_Hz); in TEST_F() local
249 EXPECT_EQ(offsets.late.sfOffset, 1'000'000); in TEST_F()
250 EXPECT_EQ(offsets.late.appOffset, 2'000'000); in TEST_F()
252 EXPECT_EQ(offsets.late.sfWorkDuration, 10'111'111ns); in TEST_F()
253 EXPECT_EQ(offsets.late.appWorkDuration, 21'222'222ns); in TEST_F()
255 EXPECT_EQ(offsets.early.sfOffset, 2'000'000); in TEST_F()
256 EXPECT_EQ(offsets.early.appOffset, 3'000'000); in TEST_F()
258 EXPECT_EQ(offsets.early.sfWorkDuration, 9'111'111ns); in TEST_F()
259 EXPECT_EQ(offsets.early.appWorkDuration, 21'222'222ns); in TEST_F()
261 EXPECT_EQ(offsets.earlyGpu.sfOffset, 3'000'000); in TEST_F()
262 EXPECT_EQ(offsets.earlyGpu.appOffset, 4'000'000); in TEST_F()
264 EXPECT_EQ(offsets.earlyGpu.sfWorkDuration, 8'111'111ns); in TEST_F()
265 EXPECT_EQ(offsets.earlyGpu.appWorkDuration, 21'222'222ns); in TEST_F()
271 auto offsets = phaseOffsets.getConfigsForRefreshRate(60_Hz); in TEST_F() local
273 EXPECT_EQ(offsets.late.sfOffset, 1'000'000); in TEST_F()
274 EXPECT_EQ(offsets.late.appOffset, 1'000'000); in TEST_F()
276 EXPECT_EQ(offsets.late.sfWorkDuration, 15'666'667ns); in TEST_F()
277 EXPECT_EQ(offsets.late.appWorkDuration, 16'666'667ns); in TEST_F()
279 EXPECT_EQ(offsets.early.sfOffset, 1'000'000); in TEST_F()
280 EXPECT_EQ(offsets.early.appOffset, 1'000'000); in TEST_F()
282 EXPECT_EQ(offsets.early.sfWorkDuration, 15'666'667ns); in TEST_F()
283 EXPECT_EQ(offsets.early.appWorkDuration, 16'666'667ns); in TEST_F()
285 EXPECT_EQ(offsets.earlyGpu.sfOffset, 1'000'000); in TEST_F()
286 EXPECT_EQ(offsets.earlyGpu.appOffset, 1'000'000); in TEST_F()
288 EXPECT_EQ(offsets.earlyGpu.sfWorkDuration, 15'666'667ns); in TEST_F()
289 EXPECT_EQ(offsets.earlyGpu.appWorkDuration, 16'666'667ns); in TEST_F()
295 auto offsets = phaseOffsets.getConfigsForRefreshRate(90_Hz); in TEST_F() local
297 EXPECT_EQ(offsets.late.sfOffset, 1'000'000); in TEST_F()
298 EXPECT_EQ(offsets.late.appOffset, 2'000'000); in TEST_F()
300 EXPECT_EQ(offsets.late.sfWorkDuration, 10'111'111ns); in TEST_F()
301 EXPECT_EQ(offsets.late.appWorkDuration, 21'222'222ns); in TEST_F()
303 EXPECT_EQ(offsets.early.sfOffset, 1'000'000); in TEST_F()
304 EXPECT_EQ(offsets.early.appOffset, 2'000'000); in TEST_F()
306 EXPECT_EQ(offsets.early.sfWorkDuration, 10'111'111ns); in TEST_F()
307 EXPECT_EQ(offsets.early.appWorkDuration, 21'222'222ns); in TEST_F()
309 EXPECT_EQ(offsets.earlyGpu.sfOffset, 1'000'000); in TEST_F()
310 EXPECT_EQ(offsets.earlyGpu.appOffset, 2'000'000); in TEST_F()
312 EXPECT_EQ(offsets.earlyGpu.sfWorkDuration, 10'111'111ns); in TEST_F()
313 EXPECT_EQ(offsets.earlyGpu.appWorkDuration, 21'222'222ns); in TEST_F()