Home
last modified time | relevance | path

Searched refs:modePtr (Results 1 – 23 of 23) sorted by relevance

/frameworks/native/services/surfaceflinger/Scheduler/include/scheduler/
DFrameRateMode.h29 ftl::NonNull<DisplayModePtr> modePtr; member
32 return isApproxEqual(fps, other.fps) && modePtr == other.modePtr;
41 ftl::to_underlying(mode.modePtr->getId()), in to_string()
42 to_string(mode.modePtr->getVsyncRate()).c_str(), in to_string()
43 to_string(mode.modePtr->getPeakFps()).c_str()); in to_string()
/frameworks/native/services/surfaceflinger/tests/unittests/mock/DisplayHardware/
DMockDisplayMode.h56 inline DisplayModePtr cloneForDisplay(PhysicalDisplayId displayId, const DisplayModePtr& modePtr) { in cloneForDisplay() argument
57 return DisplayMode::Builder(modePtr->getHwcId()) in cloneForDisplay()
58 .setId(modePtr->getId()) in cloneForDisplay()
60 .setVsyncPeriod(modePtr->getVsyncRate().getPeriodNsecs()) in cloneForDisplay()
61 .setGroup(modePtr->getGroup()) in cloneForDisplay()
62 .setResolution(modePtr->getResolution()) in cloneForDisplay()
69 for (const auto& [id, modePtr] : modes) { in cloneForDisplay()
70 clones.try_emplace(id, cloneForDisplay(displayId, modePtr)); in cloneForDisplay()
/frameworks/native/services/surfaceflinger/tests/unittests/
DRefreshRateSelectorTest.cpp70 return *RefreshRateSelector::getActiveModeLocked().modePtr; in getActiveMode()
91 getMaxRefreshRateByPolicyLocked(getActiveModeLocked().modePtr->getGroup())); in getMaxRefreshRateByPolicy()
295 selector.getBestFrameRateMode(layers).modePtr->getPeakFps()) in testFrameRateCategoryWithMultipleLayers()
300 selector.getBestFrameRateMode(layers).modePtr->getId()) in testFrameRateCategoryWithMultipleLayers()
478 EXPECT_EQ(kMode90, selector.getBestFrameRateMode().modePtr); in TEST_P()
482 EXPECT_EQ(kMode60, selector.getBestFrameRateMode().modePtr); in TEST_P()
491 EXPECT_EQ(kMode90_G1, selector.getBestFrameRateMode().modePtr); in TEST_P()
504 EXPECT_EQ(kMode72, selector.getBestFrameRateMode(layers).modePtr); in TEST_P()
515 EXPECT_EQ(kMode60, selector.getBestFrameRateMode(layers).modePtr); in TEST_P()
519 EXPECT_EQ(kMode90, selector.getBestFrameRateMode(layers).modePtr); in TEST_P()
[all …]
DSurfaceFlinger_DisplayModeSwitching.cpp176 EXPECT_EQ(dmc().getActiveMode(mDisplayId).modePtr->getId(), kModeId60); in TEST_F()
184 EXPECT_EQ(dmc().getDesiredMode(mDisplayId)->mode.modePtr->getId(), kModeId90); in TEST_F()
185 EXPECT_EQ(dmc().getActiveMode(mDisplayId).modePtr->getId(), kModeId60); in TEST_F()
196 EXPECT_EQ(dmc().getActiveMode(mDisplayId).modePtr->getId(), kModeId60); in TEST_F()
207 EXPECT_EQ(dmc().getActiveMode(mDisplayId).modePtr->getId(), kModeId90); in TEST_F()
221 EXPECT_EQ(dmc().getDesiredMode(mDisplayId)->mode.modePtr->getId(), kModeId90); in TEST_F()
222 EXPECT_EQ(dmc().getActiveMode(mDisplayId).modePtr->getId(), kModeId60); in TEST_F()
235 EXPECT_EQ(dmc().getActiveMode(mDisplayId).modePtr->getId(), kModeId90); in TEST_F()
245 EXPECT_EQ(dmc().getActiveMode(mDisplayId).modePtr->getId(), kModeId60); in TEST_F()
261 EXPECT_EQ(dmc().getDesiredMode(mDisplayId)->mode.modePtr->getId(), kModeId120); in TEST_F()
[all …]
DVSyncReactorTest.cpp233 auto modePtr = displayMode(newPeriod); in TEST_F() local
234 mReactor.onDisplayModeChanged(modePtr, false); in TEST_F()
242 modePtr = displayMode(period); in TEST_F()
243 EXPECT_CALL(*mMockTracker, isCurrentMode(modePtr)).WillOnce(Return(true)); in TEST_F()
244 mReactor.onDisplayModeChanged(modePtr, false); in TEST_F()
DDisplayModeControllerTest.cpp35 EXPECT_FRAME_RATE_MODE(expected.mode.modePtr, expected.mode.fps, requestOpt->mode); \
102 const hal::HWConfigId hwcModeId = request.mode.modePtr->getHwcId(); in expectModeSet()
DTestableScheduler.h54 const auto displayId = selectorPtr->getActiveMode().modePtr->getPhysicalDisplayId(); in TestableScheduler()
DSurfaceFlinger_SetupNewDisplayDeviceInternalTest.cpp301 .modePtr->getHwcId()); in setupNewDisplayDeviceInternalTest()
DTestableSurfaceFlinger.h999 mActiveModeId = selectorPtr->getActiveMode().modePtr->getId(); in setRefreshRateSelector()
/frameworks/native/services/surfaceflinger/Scheduler/
DRefreshRateSelector.cpp254 return isStrictlyLess(lhs.modePtr->getVsyncRate(), in createFrameRateModes()
255 rhs.modePtr->getVsyncRate()); in createFrameRateModes()
500 const auto& activeMode = *getActiveModeLocked().modePtr; in getRankedFrameRatesLocked()
507 return mode.modePtr->getPeakFps() == pacesetterFps; in getRankedFrameRatesLocked()
654 mode.modePtr->getId() == activeModeId; in getRankedFrameRatesLocked()
683 const auto& [fps, modePtr] = mode; in getRankedFrameRatesLocked()
684 const bool isSeamlessSwitch = modePtr->getGroup() == activeMode.getGroup(); in getRankedFrameRatesLocked()
688 formatLayerInfo(layer, weight).c_str(), to_string(*modePtr).c_str(), in getRankedFrameRatesLocked()
697 formatLayerInfo(layer, weight).c_str(), to_string(*modePtr).c_str(), in getRankedFrameRatesLocked()
702 if (smoothSwitchOnly && modePtr->getId() != activeModeId) { in getRankedFrameRatesLocked()
[all …]
DVsyncSchedule.cpp59 VsyncSchedule::VsyncSchedule(ftl::NonNull<DisplayModePtr> modePtr, FeatureFlags features, in VsyncSchedule() argument
61 : mId(modePtr->getPhysicalDisplayId()), in VsyncSchedule()
63 mTracker(createTracker(modePtr)), in VsyncSchedule()
65 mController(createController(modePtr->getPhysicalDisplayId(), *mTracker, features)), in VsyncSchedule()
117 VsyncSchedule::TrackerPtr VsyncSchedule::createTracker(ftl::NonNull<DisplayModePtr> modePtr) { in createTracker() argument
123 return std::make_unique<VSyncPredictor>(std::make_unique<SystemClock>(), modePtr, kHistorySize, in createTracker()
153 void VsyncSchedule::onDisplayModeChanged(ftl::NonNull<DisplayModePtr> modePtr, bool force) { in onDisplayModeChanged() argument
155 mController->onDisplayModeChanged(modePtr, force); in onDisplayModeChanged()
DVSyncReactor.cpp123 void VSyncReactor::startPeriodTransitionInternal(ftl::NonNull<DisplayModePtr> modePtr) { in startPeriodTransitionInternal() argument
126 mModePtrTransitioningTo = modePtr.get(); in startPeriodTransitionInternal()
138 void VSyncReactor::onDisplayModeChanged(ftl::NonNull<DisplayModePtr> modePtr, bool force) { in onDisplayModeChanged() argument
140 modePtr->getVsyncRate().getPeriodNsecs()); in onDisplayModeChanged()
144 if (!mSupportKernelIdleTimer && mTracker.isCurrentMode(modePtr) && !force) { in onDisplayModeChanged()
149 startPeriodTransitionInternal(modePtr); in onDisplayModeChanged()
DVSyncPredictor.cpp59 VSyncPredictor::VSyncPredictor(std::unique_ptr<Clock> clock, ftl::NonNull<DisplayModePtr> modePtr, in VSyncPredictor() argument
63 mId(modePtr->getPhysicalDisplayId()), in VSyncPredictor()
68 mDisplayModePtr(modePtr), in VSyncPredictor()
405 void VSyncPredictor::setDisplayModePtr(ftl::NonNull<DisplayModePtr> modePtr) { in setDisplayModePtr() argument
406 LOG_ALWAYS_FATAL_IF(mId != modePtr->getPhysicalDisplayId(), in setDisplayModePtr()
408 ATRACE_FORMAT("%s %s", __func__, to_string(*modePtr).c_str()); in setDisplayModePtr()
409 const auto timeout = modePtr->getVrrConfig() in setDisplayModePtr()
410 ? modePtr->getVrrConfig()->notifyExpectedPresentConfig in setDisplayModePtr()
413 to_string(*modePtr).c_str(), in setDisplayModePtr()
417 mDisplayModePtr = modePtr; in setDisplayModePtr()
[all …]
DScheduler.cpp130 std::make_shared<VsyncSchedule>(selectorPtr->getActiveMode().modePtr, mFeatures, in registerDisplay()
313 const auto displayVsync = frameRateMode.modePtr->getVsyncRate(); in getVsyncPeriod()
342 if (frameRateMode.modePtr->getVrrConfig()) { in onExpectedPresentTimePosted()
343 mSchedulerCallback.onExpectedPresentTimePosted(expectedPresentTime, frameRateMode.modePtr, in onExpectedPresentTimePosted()
534 DisplayModePtr modePtr) { in resyncToHardwareVsyncLocked() argument
543 if (!modePtr) { in resyncToHardwareVsyncLocked()
544 modePtr = display.selectorPtr->getActiveMode().modePtr.get(); in resyncToHardwareVsyncLocked()
546 if (modePtr->getVsyncRate().isValid()) { in resyncToHardwareVsyncLocked()
548 display.schedulePtr->onDisplayModeChanged(ftl::as_non_null(modePtr), kForce); in resyncToHardwareVsyncLocked()
592 to_string(mode.modePtr->getVsyncRate()).c_str()); in setRenderRate()
[all …]
DVSyncPredictor.h43 VSyncPredictor(std::unique_ptr<Clock>, ftl::NonNull<DisplayModePtr> modePtr, size_t historySize,
71 bool isCurrentMode(const ftl::NonNull<DisplayModePtr>& modePtr) const EXCLUDES(mMutex) { in isCurrentMode() argument
73 return mDisplayModePtr->getId() == modePtr->getId() && in isCurrentMode()
DVsyncSchedule.h60 VsyncSchedule(ftl::NonNull<DisplayModePtr> modePtr, FeatureFlags, RequestHardwareVsync);
130 static TrackerPtr createTracker(ftl::NonNull<DisplayModePtr> modePtr);
DVSyncTracker.h77 virtual bool isCurrentMode(const ftl::NonNull<DisplayModePtr>& modePtr) const = 0;
DScheduler.h209 DisplayModePtr modePtr = nullptr) EXCLUDES(mDisplayLock) { in EXCLUDES()
212 resyncToHardwareVsyncLocked(id, allowToEnable, modePtr); in EXCLUDES()
375 DisplayModePtr modePtr = nullptr)
438 return stream << '{' << to_string(*choice.mode.modePtr) << " considering "
DEventThread.cpp150 mode.modePtr->getPhysicalDisplayId(), systemTime()}; in makeModeChanged()
151 event.modeChange.modeId = ftl::to_underlying(mode.modePtr->getId()); in makeModeChanged()
/frameworks/native/services/surfaceflinger/Display/
DDisplayModeController.cpp105 if (const auto& desiredModePtr = desiredMode.mode.modePtr; in setDesiredMode()
106 !desiredMode.force && activeMode.modePtr->getId() == desiredModePtr->getId()) { in setDesiredMode()
118 setActiveModeLocked(displayId, activeMode.modePtr->getId(), in setDesiredMode()
119 activeMode.modePtr->getVsyncRate(), activeMode.modePtr->getPeakFps()); in setDesiredMode()
200 const auto& mode = *displayPtr->pendingModeOpt->mode.modePtr; in initiateModeChange()
/frameworks/native/services/surfaceflinger/tests/unittests/mock/
DMockFrameRateMode.h25 << (_mode).fps << " (" << (_mode).modePtr->getVsyncRate() << ")"
/frameworks/native/services/surfaceflinger/
DDisplayDevice.cpp213 return refreshRateSelector().getActiveMode().modePtr->getVsyncRate().getPeriodNsecs(); in getVsyncPeriodFromHWC()
462 updateRefreshRateOverlayRate(newMode->modePtr->getVsyncRate(), newMode->fps); in onKernelTimerChanged()
DSurfaceFlinger.cpp1213 info->activeDisplayModeId = ftl::to_underlying(mode.modePtr->getId()); in getDynamicDisplayInfoInternal()
1313 const auto displayId = mode.modePtr->getPhysicalDisplayId(); in setDesiredMode()
1337 mode.modePtr.get()); in setDesiredMode()
1432 mDisplayModeController.getActiveMode(displayId).modePtr->getResolution(); in finalizeDisplayModeChange()
1433 oldResolution != activeMode.modePtr->getResolution()) { in finalizeDisplayModeChange()
1440 state.physical->activeMode = activeMode.modePtr.get(); in finalizeDisplayModeChange()
1447 mDisplayModeController.finalizeModeChange(displayId, activeMode.modePtr->getId(), in finalizeDisplayModeChange()
1448 activeMode.modePtr->getVsyncRate(), activeMode.fps); in finalizeDisplayModeChange()
1469 auto activeModePtr = activeModeOpt->mode.modePtr; in applyActiveMode()
1494 const auto desiredModeId = desiredModeOpt->mode.modePtr->getId(); in initiateDisplayModeChanges()
[all …]