Skip to content

Commit

Permalink
add back smooth display
Browse files Browse the repository at this point in the history
  • Loading branch information
fcuzzocrea authored and franklin-albuquerque committed Sep 27, 2024
1 parent b894862 commit e84ab85
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
32 changes: 27 additions & 5 deletions overlay/frameworks/base/core/res/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,28 @@
orientation. If zero, the value of rounded_corner_radius is used. -->
<dimen name="rounded_corner_radius_bottom">32.0dip</dimen>

<!-- Whether the device enable the standalone (SA) mode of 5G NR.-->
<bool name="config_telephony5gStandalone">true</bool>

<!-- Whether the device enable the non-standalone (NSA) mode of 5G NR.-->
<bool name="config_telephony5gNonStandalone">true</bool>

<!-- The display uses different gamma curves for different refresh rates. It's hard for panel
vendor to tune the curves to have exact same brightness for different refresh rate. So
flicker could be observed at switch time. The issue is worse at the gamma lower end.
In addition, human eyes are more sensitive to the flicker at darker environment.
To prevent flicker, we only support higher refresh rates if the display brightness is above
a threshold. And the darker environment could have higher threshold.
For example, no higher refresh rate if
display brightness <= disp0 && ambient brightness <= amb0
|| display brightness <= disp1 && ambient brightness <= amb1 -->
<integer-array name="config_brightnessThresholdsOfPeakRefreshRate">
<item>45</item>
</integer-array>
<integer-array name="config_ambientThresholdsOfPeakRefreshRate">
<item>40</item>
</integer-array>

<!-- The default refresh rate for a given device. Change this value to set a higher default
refresh rate. If the hardware composer on the device supports display modes with a higher
refresh rate than the default value specified here, the framework may use those higher
Expand All @@ -61,9 +83,9 @@
config_defaultPeakRefreshRate will act as the default frame rate. -->
<integer name="config_defaultRefreshRate">0</integer>

<!-- Whether the device enable the standalone (SA) mode of 5G NR.-->
<bool name="config_telephony5gStandalone">true</bool>

<!-- Whether the device enable the non-standalone (NSA) mode of 5G NR.-->
<bool name="config_telephony5gNonStandalone">true</bool>
<!-- The default peak refresh rate for a given device. Change this value if you want to prevent
the framework from using higher refresh rates, even if display modes with higher refresh
rates are available from hardware composer. Only has an effect if the value is
non-zero. -->
<integer name="config_defaultPeakRefreshRate">120</integer>
</resources>
4 changes: 2 additions & 2 deletions overlay/packages/apps/Settings/res/values/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Whether to show peak refresh rate in display settings -->
<bool name="config_show_peak_refresh_rate_switch">true</bool>
<!-- Whether to show Smooth Display feature in Settings Options -->
<bool name="config_show_smooth_display">true</bool>
</resources>
4 changes: 3 additions & 1 deletion vendor.prop
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ ro.vendor.fingerprint.type=udfps
ro.vendor.fingerprint.sensor_location=720|2500|150

# Graphics
ro.surface_flinger.use_content_detection_for_refresh_rate=false
ro.surface_flinger.set_idle_timer_ms=4000
ro.surface_flinger.set_touch_timer_ms=4000
ro.surface_flinger.use_content_detection_for_refresh_rate=true

# RIL
ro.radio.noril=no
Expand Down

0 comments on commit e84ab85

Please sign in to comment.