Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea60e0c0 authored by LuK1337's avatar LuK1337 Committed by MajorP93
Browse files

arm64: dts: oplus: lower max brightness level to 2047

It turns out that brightness level 4095 corresponds exactly to the same
level as High Brightness Mode. That doesn't sound all that bad at first,
until you realize that the user might assume that the range of
brightness levels that they can set w/o HBM is considered to be
relatively safe. As such, we can end up with users setting max 4096
brightness all the time when using their phone, because in their minds,
it's still "safer" than HBM.

Not only that, but for our panel, when disabling HBM, the brightness
level that the panel returns to seems to be the equivalent of doing
`bl_lvl % 2048`. As such, if the backlight level was set somewere
around 87% in Android (corresponding to around ~2048 in the bl_lvl
value), then turning off HBM (or exiting out of udfps fp auth) results
in the backlight drastically dropping until the user readjusts the
backlight again.

Now, the latter problem (brightness wraparound) could be solved by just
immediately setting the bl_lvl again after turning off HBM, but that
leaves the former problem still. And that begs the question: what does
OxygenOS do?

As it turns out, on stock OOS 12, the max brightness level that OOS will
let you set *normally* is 2047. The reason why the dts has the max level
set to 4095 instead is because OOS has a feature that lets you increase
the max brightness to 4095 while watching HDR content. We don't have
such a feature in AOSP.

As such, it makes more sense to just lower the max brightness range to
2047. HBM will still work as expected.

Change-Id: I30a96aa0b25d2694be0c678afa136957fee2f95c
parent 9f3f552e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1290,8 +1290,8 @@
	qcom,panel-supply-entries = <&dsi_panel_pwr_supply_samsung>;
	qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_dcs";
	qcom,mdss-dsi-bl-min-level = <1>;
	qcom,mdss-dsi-bl-max-level = <4095>;
	qcom,mdss-brightness-max-level = <4095>;
	qcom,mdss-dsi-bl-max-level = <2047>;
	qcom,mdss-brightness-max-level = <2047>;
	qcom,mdss-dsi-bl-normal-max-level = <2047>;
	qcom,mdss-brightness-normal-max-level = <2047>;
	qcom,mdss-brightness-default-level = <320>;