SF: Revamp frequencyScale backdoor
Update the frequencyScale backdoor (1029) to do a primary
display hot unplug-plug so that the updated frequency makes
it to the DisplayManager
Test: adb shell service call SurfaceFlinger 1029 i32 2 i32 3
Change-Id: Id93a5946ee19fbe9925789ba3294cbf213a52c30
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.h b/services/surfaceflinger/DisplayHardware/HWComposer.h
index 3c5efea..9e01626 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.h
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.h
@@ -184,6 +184,14 @@
android::Hwc2::Composer* getComposer() const { return mHwcDevice->getComposer(); }
std::optional<hwc2_display_t> getHwcDisplayId(int32_t displayId) const;
+
+ // ------------------------------------------------------------------------
+ // These functions set and get the frequencyScaler. The frequencyScaler holds
+ // a multiplier and divisor for virtually scaling the panel frequency in
+ // software. This is used to simulate different panel frequencies when
+ // panel hardware is not available.
+ void setDisplayFrequencyScaleParameters(HWC2::Device::FrequencyScaler frequencyScaler);
+ HWC2::Device::FrequencyScaler getDisplayFrequencyScaleParameters();
private:
// For unit tests
friend TestableSurfaceFlinger;