From 3eba9186cf8f81da7cbf77af7a55f999622b477b Mon Sep 17 00:00:00 2001 From: maoyue730 Date: Sat, 23 Aug 2025 16:11:11 +0800 Subject: [PATCH] fix bug: config 60fps but only 54~55 fps --- .../frameworks/native/frameworks-native-0001.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/aosp15r17-patch/frameworks/native/frameworks-native-0001.patch b/aosp15r17-patch/frameworks/native/frameworks-native-0001.patch index cb73918..668ee16 100644 --- a/aosp15r17-patch/frameworks/native/frameworks-native-0001.patch +++ b/aosp15r17-patch/frameworks/native/frameworks-native-0001.patch @@ -56,3 +56,17 @@ index ab9014e418..8bce49cb41 100644 constructAvailableRefreshRates(); displayId = getActiveModeLocked().modePtr->getPhysicalDisplayId(); +diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp +index 65a0ed3065..0fd9262b3b 100644 +--- a/services/surfaceflinger/SurfaceFlinger.cpp ++++ b/services/surfaceflinger/SurfaceFlinger.cpp +@@ -2924,7 +2924,8 @@ CompositeResultsPerDisplay SurfaceFlinger::composite( + // TODO(b/160583065): Enable skip validation when SF caches all client composition layers. + const bool hasGpuUseOrReuse = + coverage.any(CompositionCoverage::Gpu | CompositionCoverage::GpuReuse); +- mScheduler->modulateVsync({}, &VsyncModulator::onDisplayRefresh, hasGpuUseOrReuse); ++ // fix bug: 解决配置60fps实际帧率只有54、55问题。此处会引入额外的offset,导致vsync周期偏大 ++ // mScheduler->modulateVsync({}, &VsyncModulator::onDisplayRefresh, hasGpuUseOrReuse); + + mLayersWithQueuedFrames.clear(); + mLayersIdsWithQueuedFrames.clear(); -- Gitee