Skip to content

Commit

Permalink
lunaa: WIP: Redo brightness configuration and move partially to displ…
Browse files Browse the repository at this point in the history
…ayconfig

* 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)

* Removed some overlays so as to prefer the defaults.

* Update auto brightness overlays from stock display dumpsys under
OplusSmartBrightnessController.

Change-Id: I0b2513be866728f3ddf93f7fbe296d78d862c813
  • Loading branch information
pjgowtham committed Nov 11, 2024
1 parent e8e5091 commit be07d68
Show file tree
Hide file tree
Showing 3 changed files with 159 additions and 237 deletions.
39 changes: 39 additions & 0 deletions configs/display_id_4630946741972277890.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<displayConfiguration>
<screenBrightnessMap interpolation="linear">
<point>
<value>0.0014367816</value>
<nits>2.0</nits>
</point>
<point>
<value>1.0</value>
<nits>500.0</nits>
</point>
</screenBrightnessMap>
<highBrightnessMode enabled="true">
<transitionPoint>0.73633</transitionPoint>
<minimumHdrPercentOfScreen>0.1</minimumHdrPercentOfScreen>
<minimumLux>8700</minimumLux>
<timing>
<timeWindowSecs>1800</timeWindowSecs>
<timeMaxSecs>300</timeMaxSecs>
<timeMinSecs>60</timeMinSecs>
</timing>
<sdrHdrRatioMap>
<point>
<sdrNits>2.000</sdrNits>
<hdrRatio>8.000</hdrRatio>
</point>
<point>
<sdrNits>500.000</sdrNits>
<hdrRatio>1.5</hdrRatio>
</point>
</sdrHdrRatioMap>
</highBrightnessMode>
<screenBrightnessRampFastDecrease>0.06</screenBrightnessRampFastDecrease>
<screenBrightnessRampFastIncrease>0.06</screenBrightnessRampFastIncrease>
<screenBrightnessRampSlowDecrease>0.04</screenBrightnessRampSlowDecrease>
<screenBrightnessRampSlowIncrease>0.04</screenBrightnessRampSlowIncrease>
<screenBrightnessRampIncreaseMaxMillis>3000</screenBrightnessRampIncreaseMaxMillis>
<screenBrightnessRampDecreaseMaxMillis>3000</screenBrightnessRampDecreaseMaxMillis>
</displayConfiguration>
4 changes: 4 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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.st \
Expand Down
Loading

0 comments on commit be07d68

Please sign in to comment.