Skip to content

Commit e67937f

Browse files
author
Su Hong Koo
committed
SF: Feed presentation fences to external displays' vsync predictors
Currently, the presentation fences from hardware composer are only fed to vsync predictors for internal displays. Since presentation fence signal times are used to keep the prediction model fresh, external displays without fence timings become significantly less accurate after some time (seconds). The drift in the external displays’ vsync prediction results in inaccurate expectation presentation times being fed across SurfaceFlinger, and may result in inaccurate metrics/traces. This CL changes the qualification for feeding presentation fences to vsync schedules from is internal to is physical display, which is implicit. Refer to the bug for traces and more detail. Flag: EXEMPT bugfix Bug: 394879543 Test: manual testing and verification using frame timeline/tracing Change-Id: I69321c6eb0682adb5763c7281d376055d59de8fd
1 parent ff04516 commit e67937f

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

services/surfaceflinger/SurfaceFlinger.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3459,13 +3459,7 @@ void SurfaceFlinger::onCompositionPresented(PhysicalDisplayId pacesetterId,
34593459
mTimeStats->setPresentFenceGlobal(pacesetterPresentFenceTime);
34603460

34613461
for (auto&& [id, presentFence] : presentFences) {
3462-
ftl::FakeGuard guard(mStateLock);
3463-
const bool isInternalDisplay =
3464-
mPhysicalDisplays.get(id).transform(&PhysicalDisplay::isInternal).value_or(false);
3465-
3466-
if (isInternalDisplay) {
3467-
mScheduler->addPresentFence(id, std::move(presentFence));
3468-
}
3462+
mScheduler->addPresentFence(id, std::move(presentFence));
34693463
}
34703464

34713465
const bool hasPacesetterDisplay =

0 commit comments

Comments
 (0)