venus: configs: ship displayconfig for brightness ramp rate

Android 12 allows the brightness ramp rate to be changed separately
for fast/slow and increase/decrease in float. Once loaded,
DisplayDeviceConfig has higher priority than the integer config
values in frameworks. The format definition is in [1].

There are 3 variants for the filename:

* display_id_46xxxxx.xml
* display_19xxxxx.xml
* display_port_xxx.xml

The value can be found in boot logs by grepping DisplayDeviceInfo.
On android 12, boot log reports the 46xxxxx value of the first
variant.

The xml file can be put in either product or vendor.

[1] frameworks/base/services/core/xsd/display-device-config/display-device-config.xsd

Signed-off-by: Chenyang Zhong <zhongcy95@gmail.com>
This commit is contained in:
Chenyang Zhong
2022-03-06 02:40:06 -05:00
committed by Joey Huab
parent 90e13d689c
commit f1c1b5044a
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<!-- Copyright (C) 2020 Google Inc.
Copyright (C) 2022 The Pixel Experience Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<displayConfiguration>
<screenBrightnessRampFastDecrease>0.5</screenBrightnessRampFastDecrease>
<screenBrightnessRampFastIncrease>0.5</screenBrightnessRampFastIncrease>
<screenBrightnessRampSlowDecrease>0.04</screenBrightnessRampSlowDecrease>
<screenBrightnessRampSlowIncrease>0.05</screenBrightnessRampSlowIncrease>
<screenBrightnessMap>
<point>
<value>0.0</value>
<nits>2</nits>
</point>
<point>
<value>1.0</value>
<nits>1000.0</nits>
</point>
</screenBrightnessMap>
</displayConfiguration>

View File

@@ -10,6 +10,10 @@ $(call inherit-product, device/xiaomi/sm8350-common/common.mk)
# Inherit from miuicamera-venus
$(call inherit-product-if-exists, device/xiaomi/miuicamera-venus/device.mk)
# Display Device Config
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/display_id_4630946736638489730.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/displayconfig/display_id_4630946736638489730.xml
# Fingerprint
PRODUCT_PACKAGES += \
libudfpshandler