From 39a59918243be91ae040c86280cdeaf8710aa853 Mon Sep 17 00:00:00 2001 From: pjgowtham Date: Sun, 10 Nov 2024 13:53:46 +0530 Subject: [PATCH] cupidr: Redo brightness configuration and move partially to displayconfig * Updated minimum brightness calculation from 4/2047 to 4/2784 to align with display DTSI's max level (qcom,mdss-brightness-min-level = 1, qcom,mdss-brightness-max-level = 2784). * Synced screenBrightnessRamp with Oplus SM8650. * screenBrightnessMap is preferred as it supports only floating-point values. * Calculated High Brightness Mode (HBM) transition point as 2047/(2784-4). The transition lux is also obtained from OplusSmartBrightnessController. * Removed some overlays so as to prefer the defaults. * Update auto brightness overlays from stock display dumpsys under OplusSmartBrightnessController. Change-Id: I0b2513be866728f3ddf93f7fbe296d78d862c813 --- configs/display_id_4630946741972277890.xml | 39 ++ device.mk | 4 + .../res/values/config.xml | 353 ++++++------------ 3 files changed, 159 insertions(+), 237 deletions(-) create mode 100644 configs/display_id_4630946741972277890.xml diff --git a/configs/display_id_4630946741972277890.xml b/configs/display_id_4630946741972277890.xml new file mode 100644 index 0000000..6942b3b --- /dev/null +++ b/configs/display_id_4630946741972277890.xml @@ -0,0 +1,39 @@ + + + + + 0.0014367816 + 2.0 + + + 1.0 + 500.0 + + + + 0.73633 + 0.1 + 8700 + + 1800 + 300 + 60 + + + + 2.000 + 8.000 + + + 500.000 + 1.5 + + + + 0.06 + 0.06 + 0.04 + 0.04 + 3000 + 3000 + diff --git a/device.mk b/device.mk index 75ea98b..d0c8b42 100644 --- a/device.mk +++ b/device.mk @@ -27,6 +27,10 @@ TARGET_SCREEN_WIDTH := 1080 PRODUCT_COPY_FILES += \ $(LOCAL_PATH)/media/media_profiles_vendor.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_vendor.xml +# Display +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/configs/display_id_4630946741972277890.xml:$(TARGET_COPY_OUT_VENDOR)/etc/displayconfig/display_id_4630946741972277890.xml + # NFC PRODUCT_PACKAGES += \ android.hardware.nfc-service.nxp \ diff --git a/overlay/OPlusFrameworksResTarget/res/values/config.xml b/overlay/OPlusFrameworksResTarget/res/values/config.xml index 4eaaf96..dabc330 100644 --- a/overlay/OPlusFrameworksResTarget/res/values/config.xml +++ b/overlay/OPlusFrameworksResTarget/res/values/config.xml @@ -87,51 +87,63 @@ Must be overridden in platform specific overlays --> - 1 + 2 4 - 12 + 6 + 8 + 10 + 15 20 - 28 - 47 - 63 - 86 - 150 + 25 + 30 + 35 + 40 + 45 + 50 + 55 + 60 + 65 + 70 + 75 + 80 + 95 + 100 + 120 + 140 + 160 + 180 + 200 220 - 270 + 240 + 260 + 280 + 300 + 320 + 340 360 + 380 + 400 420 - 510 - 620 - 1000 + 440 + 460 + 480 + 500 + 700 + 900 + 1100 + 1300 + 1500 + 1700 + 1900 2000 + 2500 + 2800 3100 - 3988 - 5018 - 6232 - 7648 - 9280 - 11146 - 13261 - 15640 - 18302 - 21260 - 24532 - 28133 - 32080 - 36388 - 41073 - 46153 - 51642 - 63912 - 78015 - 94076 - 112226 - 132592 - 155302 - 180486 - 208271 - 223180 - 255108 + 3400 + 3700 + 4000 + 4500 + 5000 - 2.0487 - 4.8394 - 15.2619 - 33 - 49 - 62.95 - 76.46 - 84.38 - 89.51 - 100.34 - 109.48 - 115 - 117.67 - 122.72 - 131.17 - 141.19 - 167.05 - 234.9 - 279 - 300 - 320 - 340 - 360 - 380 - 400 - 420 - 440 - 460 - 480 - 500 - 520 - 540 - 560 - 580 - 600 - 620 - 660 - 700 - 740 - 780 - 820 - 860 - 900 - 940 - 960 - 1000 - - - - - 0.0 - 2.1 - 2.31 - 2.63 - 3.16 - 3.73 - 4.42 - 5.45 - 6.69 - 8.07 - 9.65 - 11.32 - 13.26 - 15.59 - 18.14 - 20.68 - 23.58 - 26.38 - 29.67 - 32.83 - 36.03 - 39.31 - 43.8 - 47.95 - 52.08 - 56.86 - 61.83 - 67.93 - 73.37 - 79.96 - 86.15 - 90.75 - 97.83 - 105.67 - 112.79 - 120.33 - 127.82 - 135.71 - 145.0 - 153.32 - 161.78 - 170.61 - 179.7 - 190.25 - 201.81 - 212.07 - 222.79 - 234.01 - 246.43 - 257.49 - 269.8 - 281.41 - 293.94 - 307.58 - 322.53 - 335.82 - 349.68 - 364.86 - 379.57 - 398.55 - 413.85 - 429.97 - 442.89 - 461.76 - 478.65 + 2.0 + 3.0 + 5.0 + 10.0 + 15.0 + 22.0 + 40.0 + 60.0 + 75.0 + 80.0 + 82.0 + 82.0 + 82.0 + 83.0 + 83.0 + 83.0 + 84.0 + 84.0 + 85.0 + 85.0 + 86.0 + 86.0 + 87.0 + 89.0 + 95.0 + 100.0 + 105.0 + 110.0 + 115.0 + 120.0 + 122.0 + 123.0 + 124.0 + 126.0 + 127.0 + 128.0 + 129.0 + 130.0 + 131.0 + 132.0 + 134.0 + 136.0 + 137.0 + 157.0 + 180.0 + 205.0 + 226.0 + 246.0 + 264.0 + 273.0 + 310.0 + 340.0 + 362.0 + 380.0 + 400.0 + 420.0 + 450.0 + 502.0 - - - 0 - 4 - 8 - 12 - 16 - 20 - 24 - 28 - 32 - 36 - 40 - 44 - 48 - 52 - 56 - 60 - 64 - 68 - 72 - 76 - 80 - 84 - 88 - 92 - 96 - 100 - 104 - 108 - 112 - 116 - 120 - 123 - 127 - 131 - 135 - 139 - 143 - 147 - 151 - 155 - 159 - 163 - 167 - 171 - 175 - 179 - 183 - 187 - 191 - 195 - 199 - 203 - 207 - 211 - 215 - 219 - 223 - 227 - 231 - 235 - 239 - 243 - 246 - 251 - 255 - - - 6 + 0.0014367816 + + + 0.0014367816 - 0.45882353 + 0.36745689655 - 0.001954079 - - - 200 + 0.0014367816 false