diff options
author | Midas Chien <midaschieh@google.com> | 2020-12-29 20:02:34 +0800 |
---|---|---|
committer | Midas Chien <midaschieh@google.com> | 2020-12-29 20:04:26 +0800 |
commit | b37391542bc82d1b9491ac4b3d6266c86a5c2282 (patch) | |
tree | a2e89b1fed1a22d491c7e67f8e72c5da09ed792d /libhwc2.1/libresource | |
parent | 3a4a3122b2e51de484ba5f2bbb9fd8934f460551 (diff) | |
download | gs101-b37391542bc82d1b9491ac4b3d6266c86a5c2282.tar.gz |
libhwc2.1: set frame rate for acryl module
Higher refresh rate should expected shorter execution time to keep
performance health. Base on system refresh rate to set frame rate for
acryl module. Acryl module can base on frame rate to calculate required
bandwidth.
Bug: 176399781
Test: play downscale video by G2D on 60hz and 90hz, obsesved bandwidth
request is different
Test: VtsHalGraphicsComposerV2_4TargetTest
Change-Id: I2582d43c5ad29cf7889d90862ea3752124337eb4
Diffstat (limited to 'libhwc2.1/libresource')
-rw-r--r-- | libhwc2.1/libresource/ExynosResourceManagerModule.cpp | 6 | ||||
-rw-r--r-- | libhwc2.1/libresource/ExynosResourceManagerModule.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp index 365ad48..714f309 100644 --- a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp +++ b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp @@ -25,3 +25,9 @@ ExynosResourceManagerModule::ExynosResourceManagerModule(ExynosDevice* device) ExynosResourceManagerModule::~ExynosResourceManagerModule() { } + +void ExynosResourceManagerModule::setFrameRateForPerformance( + ExynosMPP &mpp, AcrylicPerformanceRequestFrame *frame) { + int frame_rate = static_cast<int>(1e9f / mpp.mAssignedDisplay->mVsyncPeriod); + frame->setFrameRate(frame_rate); +} diff --git a/libhwc2.1/libresource/ExynosResourceManagerModule.h b/libhwc2.1/libresource/ExynosResourceManagerModule.h index 19da403..554137f 100644 --- a/libhwc2.1/libresource/ExynosResourceManagerModule.h +++ b/libhwc2.1/libresource/ExynosResourceManagerModule.h @@ -22,6 +22,10 @@ class ExynosResourceManagerModule : public ExynosResourceManager { public: ExynosResourceManagerModule(ExynosDevice* device); ~ExynosResourceManagerModule(); + + protected: + void setFrameRateForPerformance(ExynosMPP &mpp, + AcrylicPerformanceRequestFrame *frame) override; }; #endif // _EXYNOS_RESOURCE_MANAGER_MODULE_H |