diff --git a/common.mk b/common.mk
index 28280d3c..610e3979 100644
--- a/common.mk
+++ b/common.mk
@@ -195,6 +195,7 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
init.class_main.sh \
init.oem.rc \
+ init.oneplus.display.rc \
init.oneplus.usb.rc \
init.qcom.class_core.sh \
init.qcom.early_boot.sh \
diff --git a/init/Android.bp b/init/Android.bp
index 48de8736..5a36ce65 100644
--- a/init/Android.bp
+++ b/init/Android.bp
@@ -77,6 +77,13 @@ prebuilt_etc {
vendor: true,
}
+prebuilt_etc {
+ name: "init.oneplus.display.rc",
+ src: "etc/init.oneplus.display.rc",
+ sub_dir: "init",
+ vendor: true,
+}
+
prebuilt_etc {
name: "init.oneplus.usb.rc",
src: "etc/init.oneplus.usb.rc",
diff --git a/init/etc/init.oneplus.display.rc b/init/etc/init.oneplus.display.rc
new file mode 100644
index 00000000..9d6008eb
--- /dev/null
+++ b/init/etc/init.oneplus.display.rc
@@ -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
diff --git a/overlay/OnePlusSM8150Frameworks/res/values/config.xml b/overlay/OnePlusSM8150Frameworks/res/values/config.xml
index 64f49d53..a36b99c3 100644
--- a/overlay/OnePlusSM8150Frameworks/res/values/config.xml
+++ b/overlay/OnePlusSM8150Frameworks/res/values/config.xml
@@ -235,10 +235,46 @@
- 0:2:15
-
-
-
-
true
+
+
+
+ - 0
+ - 256
+ - 257
+ - 258
+ - 259
+ - 260
+
+
+
+
+ - 0
+ - 256
+ - 257
+ - 258
+ - 259
+ - 260
+
+
+
+ - 0
+ - 0
+ - 9
+ - 0
+ - 9
+ - 0
+
+
diff --git a/overlay/OnePlusSM8150Settings/res/values/config.xml b/overlay/OnePlusSM8150Settings/res/values/config.xml
index a753a847..dc574a82 100644
--- a/overlay/OnePlusSM8150Settings/res/values/config.xml
+++ b/overlay/OnePlusSM8150Settings/res/values/config.xml
@@ -30,4 +30,28 @@
should be either LOW (1) or HIGH (3).
-->
3
+
+
+
+ - Standard (Reboot needed)
+ - Natural
+ - Vivid
+ - sRGB
+ - DCI-P3
+ - AMOLED Wide Gamut
+
+
+
+
+ - 0
+ - 256
+ - 257
+ - 258
+ - 259
+ - 260
+