summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralk3pInjection <webmaster@raspii.tech>2023-01-11 15:53:05 +0800
committeralk3pInjection <webmaster@raspii.tech>2023-01-11 15:53:05 +0800
commitaba92b574a8bc013796948da49c4d7de21e39e76 (patch)
treedc323b7bdef8dfe1c02e2a99e5fccb9246242f1f
parent08d139ac0cf9c7c2148266b8f8bcb02c89f77a05 (diff)
parentaf087c4c7cfb51f1d7e5a39e0c4d8e6b5a1437c4 (diff)
Merge tag 'LA.QSSI.13.0.r1-08600-qssi.0' into tachibana
"LA.QSSI.13.0.r1-08600-qssi.0" Change-Id: I33c0ad9053eb76f9f220a5e34f6845e72eb66f2b
-rw-r--r--services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp1
-rw-r--r--services/surfaceflinger/Scheduler/RefreshRateConfigs.cpp9
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp4
3 files changed, 11 insertions, 3 deletions
diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
index 21be02b4a9..b0f74c23e3 100644
--- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
+++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp
@@ -70,6 +70,7 @@ VirtualDisplaySurface::VirtualDisplaySurface(HWComposer& hwc, VirtualDisplayId d
mFbProducerSlot(BufferQueue::INVALID_BUFFER_SLOT),
mOutputProducerSlot(BufferQueue::INVALID_BUFFER_SLOT),
mSecure(secure),
+ mSinkUsage(0),
mForceHwcCopy(SurfaceFlinger::useHwcForRgbToYuv) {
mSource[SOURCE_SINK] = sink;
mSource[SOURCE_SCRATCH] = bqProducer;
diff --git a/services/surfaceflinger/Scheduler/RefreshRateConfigs.cpp b/services/surfaceflinger/Scheduler/RefreshRateConfigs.cpp
index d128fefda9..2fc48754e9 100644
--- a/services/surfaceflinger/Scheduler/RefreshRateConfigs.cpp
+++ b/services/surfaceflinger/Scheduler/RefreshRateConfigs.cpp
@@ -467,7 +467,14 @@ auto RefreshRateConfigs::getBestRefreshRateLocked(const std::vector<LayerRequire
? getMaxScoreRefreshRate(scores.rbegin(), scores.rend())
: getMaxScoreRefreshRate(scores.begin(), scores.end());
- if (primaryRangeIsSingleRate) {
+ bool noFpsScored = std::all_of(scores.begin(), scores.end(),
+ [](RefreshRateScore score) { return score.score == 0; });
+ if (noFpsScored) {
+ ALOGV("No fps scored - choose %s", to_string(mActiveModeIt->second->getFps()).c_str());
+ return {mActiveModeIt->second, kNoSignals};
+ }
+
+ if (primaryRangeIsSingleRate) {
// If we never scored any layers, then choose the rate from the primary
// range instead of picking a random score from the app range.
if (std::all_of(scores.begin(), scores.end(),
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index d2d1f88b73..1751b16233 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -3664,8 +3664,7 @@ void SurfaceFlinger::updateVsyncSource()
mScheduler->onScreenReleased(mAppConnectionHandle);
} else if (mNextVsyncSource && (mActiveVsyncSource == NULL)) {
mScheduler->onScreenAcquired(mAppConnectionHandle);
- bool isPrimary = mNextVsyncSource->isPrimary();
- nsecs_t vsync = (isPrimary && (mVsyncPeriod > 0)) ? mVsyncPeriod : getVsyncPeriodFromHWC();
+ nsecs_t vsync = getVsyncPeriodFromHWC();
mScheduler->resyncToHardwareVsync(true, Fps::fromPeriodNsecs(vsync));
} else if ((mNextVsyncSource != NULL) &&
(mActiveVsyncSource != NULL)) {
@@ -4175,6 +4174,7 @@ void SurfaceFlinger::processDisplayChanged(const wp<IBinder>& displayToken,
if (display->isVirtual()) {
releaseVirtualDisplay(display->getVirtualId());
}
+ destroySmomoInstance(display);
}
mDisplays.erase(displayToken);