sm8150-common: Use OnePlus panel modes for SF-based colour modes

Change-Id: I9187f27529ea59bba773ebbd2d221f19fec72a04
Signed-off-by: Omkar Chandorkar <gotenksIN@aospa.co>
This commit is contained in:
Omkar Chandorkar 2023-07-19 21:50:04 +09:00 committed by Cyber Knight
parent eb87f78e92
commit 568ea20441
No known key found for this signature in database
GPG Key ID: 23BD4CCD326E9D64
5 changed files with 113 additions and 4 deletions

View File

@ -195,6 +195,7 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \
init.class_main.sh \ init.class_main.sh \
init.oem.rc \ init.oem.rc \
init.oneplus.display.rc \
init.oneplus.usb.rc \ init.oneplus.usb.rc \
init.qcom.class_core.sh \ init.qcom.class_core.sh \
init.qcom.early_boot.sh \ init.qcom.early_boot.sh \

View File

@ -77,6 +77,13 @@ prebuilt_etc {
vendor: true, vendor: true,
} }
prebuilt_etc {
name: "init.oneplus.display.rc",
src: "etc/init.oneplus.display.rc",
sub_dir: "init",
vendor: true,
}
prebuilt_etc { prebuilt_etc {
name: "init.oneplus.usb.rc", name: "init.oneplus.usb.rc",
src: "etc/init.oneplus.usb.rc", src: "etc/init.oneplus.usb.rc",

View File

@ -0,0 +1,41 @@
on property:persist.sys.sf.native_mode=0
write /sys/class/drm/card0-DSI-1/native_display_customer_p3_mode 0
write /sys/class/drm/card0-DSI-1/native_display_customer_srgb_mode 0
write /sys/class/drm/card0-DSI-1/native_display_p3_mode 0
write /sys/class/drm/card0-DSI-1/native_display_srgb_color_mode 0
write /sys/class/drm/card0-DSI-1/native_display_wide_color_mode 0
on property:persist.sys.sf.native_mode=256
write /sys/class/drm/card0-DSI-1/native_display_customer_p3_mode 0
write /sys/class/drm/card0-DSI-1/native_display_customer_srgb_mode 1
write /sys/class/drm/card0-DSI-1/native_display_p3_mode 0
write /sys/class/drm/card0-DSI-1/native_display_srgb_color_mode 0
write /sys/class/drm/card0-DSI-1/native_display_wide_color_mode 0
on property:persist.sys.sf.native_mode=257
write /sys/class/drm/card0-DSI-1/native_display_customer_p3_mode 1
write /sys/class/drm/card0-DSI-1/native_display_customer_srgb_mode 0
write /sys/class/drm/card0-DSI-1/native_display_p3_mode 0
write /sys/class/drm/card0-DSI-1/native_display_srgb_color_mode 0
write /sys/class/drm/card0-DSI-1/native_display_wide_color_mode 0
on property:persist.sys.sf.native_mode=258
write /sys/class/drm/card0-DSI-1/native_display_customer_p3_mode 0
write /sys/class/drm/card0-DSI-1/native_display_customer_srgb_mode 0
write /sys/class/drm/card0-DSI-1/native_display_p3_mode 0
write /sys/class/drm/card0-DSI-1/native_display_srgb_color_mode 1
write /sys/class/drm/card0-DSI-1/native_display_wide_color_mode 0
on property:persist.sys.sf.native_mode=259
write /sys/class/drm/card0-DSI-1/native_display_customer_p3_mode 0
write /sys/class/drm/card0-DSI-1/native_display_customer_srgb_mode 0
write /sys/class/drm/card0-DSI-1/native_display_p3_mode 1
write /sys/class/drm/card0-DSI-1/native_display_srgb_color_mode 0
write /sys/class/drm/card0-DSI-1/native_display_wide_color_mode 0
on property:persist.sys.sf.native_mode=260
write /sys/class/drm/card0-DSI-1/native_display_customer_p3_mode 0
write /sys/class/drm/card0-DSI-1/native_display_customer_srgb_mode 0
write /sys/class/drm/card0-DSI-1/native_display_p3_mode 0
write /sys/class/drm/card0-DSI-1/native_display_srgb_color_mode 0
write /sys/class/drm/card0-DSI-1/native_display_wide_color_mode 1

View File

@ -235,10 +235,46 @@
<item>0:2:15</item> <!-- ID0:Fingerprint:Strong --> <item>0:2:15</item> <!-- ID0:Fingerprint:Strong -->
</string-array> </string-array>
<!-- Indicate available ColorDisplayManager.COLOR_MODE_xxx. -->
<integer-array name="config_availableColorModes">
</integer-array>
<!-- If device supports pickup/lift gesture --> <!-- If device supports pickup/lift gesture -->
<bool name="config_dozePulsePickup">true</bool> <bool name="config_dozePulsePickup">true</bool>
<!-- List supported color modes. -->
<integer-array name="config_availableColorModes">
<item>0</item>
<item>256</item>
<item>257</item>
<item>258</item>
<item>259</item>
<item>260</item>
</integer-array>
<!-- The following two arrays specify which color space to use for display composition when a
certain color mode is active.
Composition color spaces are defined in android.view.Display.COLOR_MODE_xxx, and color
modes are defined in ColorDisplayManager.COLOR_MODE_xxx and
ColorDisplayManager.VENDOR_COLOR_MODE_xxx.
The color space COLOR_MODE_DEFAULT (0) lets the system select the most appropriate
composition color space for currently displayed content. Other values (e.g.,
COLOR_MODE_SRGB) override system selection; these other color spaces must be supported by
the device for for display composition.
If a color mode does not have a corresponding color space specified in this array, the
currently set composition color space will not be modified.-->
<integer-array name="config_displayCompositionColorModes">
<item>0</item>
<item>256</item>
<item>257</item>
<item>258</item>
<item>259</item>
<item>260</item>
</integer-array>
<integer-array name="config_displayCompositionColorSpaces">
<item>0</item>
<item>0</item>
<item>9</item>
<item>0</item>
<item>9</item>
<item>0</item>
</integer-array>
</resources> </resources>

View File

@ -30,4 +30,28 @@
should be either LOW (1) or HIGH (3). should be either LOW (1) or HIGH (3).
--> -->
<integer name="config_vibration_supported_intensity_levels">3</integer> <integer name="config_vibration_supported_intensity_levels">3</integer>
<!-- Display settings screen, Color mode options. Must be the same length and order as
config_color_mode_options_values below. Only the values that also appear in
frameworks/base/core/res/res/values/config.xml's config_availableColorModes are shown. -->
<string-array name="config_color_mode_options_strings" translatable="false">
<item>Standard (Reboot needed)</item>
<item>Natural</item>
<item>Vivid</item>
<item>sRGB</item>
<item>DCI-P3</item>
<item>AMOLED Wide Gamut</item>
</string-array>
<!-- Display settings screen, Color mode options. Must be the same length and order as
config_color_mode_options_strings above. Only the values that also appear in
frameworks/base/core/res/res/values/config.xml's config_availableColorModes are shown. -->
<integer-array name="config_color_mode_options_values" translatable="false">
<item>0</item>
<item>256</item>
<item>257</item>
<item>258</item>
<item>259</item>
<item>260</item>
</integer-array>
</resources> </resources>