Revert "Skip primaryRangeIsSingleRate check for ARR"
This reverts commit 861e3478823930d9b2496be19eb7afff550e3c41.
Reason for revert: The policy is being ignored. Also see doc http://docs/document/d/1Bu4AMHFZ3UMVHM_-jyp2ogu-oEaeBy0EgKcoMbkCM1w?tab=t.0
Test: atest libsurfaceflinger_unittest
Change-Id: I7a80540ff4cc398d0764d3af53bfea77731b01a8
diff --git a/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp b/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp
index 84fa139..e4069dd 100644
--- a/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp
+++ b/services/surfaceflinger/Scheduler/RefreshRateSelector.cpp
@@ -770,17 +770,13 @@
const bool inPrimaryPhysicalRange =
policy->primaryRanges.physical.includes(modePtr->getPeakFps());
const bool inPrimaryRenderRange = policy->primaryRanges.render.includes(fps);
- if (!mIsVrrDevice.load() &&
- ((policy->primaryRangeIsSingleRate() && !inPrimaryPhysicalRange) ||
+ if (((policy->primaryRangeIsSingleRate() && !inPrimaryPhysicalRange) ||
!inPrimaryRenderRange) &&
!(layer.focused &&
(layer.vote == LayerVoteType::ExplicitDefault ||
layer.vote == LayerVoteType::ExplicitExact))) {
// Only focused layers with ExplicitDefault frame rate settings are allowed to score
// refresh rates outside the primary range.
- ALOGV("%s ignores %s (primaryRangeIsSingleRate). Current mode = %s",
- formatLayerInfo(layer, weight).c_str(), to_string(*modePtr).c_str(),
- to_string(activeMode).c_str());
continue;
}
@@ -904,8 +900,7 @@
to_string(descending.front().frameRateMode.fps).c_str());
return {descending, kNoSignals};
} else {
- ALOGV("%s (primaryRangeIsSingleRate)",
- to_string(ranking.front().frameRateMode.fps).c_str());
+ ALOGV("primaryRangeIsSingleRate");
SFTRACE_FORMAT_INSTANT("%s (primaryRangeIsSingleRate)",
to_string(ranking.front().frameRateMode.fps).c_str());
return {ranking, kNoSignals};
@@ -1041,14 +1036,12 @@
// Layers with ExplicitExactOrMultiple expect touch boost
if (globalSignals.touch && hasExplicitExactOrMultiple) {
- ALOGV("%s: Skipping for touch (input signal): uid=%d", __func__, uid);
continue;
}
// Mirrors getRankedFrameRates. If there is no ExplicitDefault, expect touch boost and
// skip frame rate override.
if (hasHighHint && !hasExplicitDefault) {
- ALOGV("%s: Skipping for touch (HighHint): uid=%d", __func__, uid);
continue;
}
@@ -1072,9 +1065,6 @@
constexpr bool isSeamlessSwitch = true;
const auto layerScore = calculateLayerScoreLocked(*layer, fps, isSeamlessSwitch);
score += layer->weight * layerScore;
- ALOGV("%s: %s gives %s fps score of %.4f", __func__,
- formatLayerInfo(*layer, layer->weight).c_str(), to_string(fps).c_str(),
- layerScore);
}
}
@@ -1329,8 +1319,6 @@
LOG_ALWAYS_FATAL_IF(!activeModeOpt);
mActiveModeOpt = FrameRateMode{activeModeOpt->get()->getPeakFps(),
ftl::as_non_null(activeModeOpt->get())};
- mIsVrrDevice = FlagManager::getInstance().vrr_config() &&
- activeModeOpt->get()->getVrrConfig().has_value();
const auto sortedModes = sortByRefreshRate(mDisplayModes);
mMinRefreshRateModeIt = sortedModes.front();