drm: msm: default to FOD dimming when calculating alpha
* Since commit ac878e6b, DC dimming has been introduced, which shares some logic with FOD. The original function to calculate alpha to dim the screen to the same brightness before enabling HBM has been modified to also work with DC dimming. It distinguishes the two cases (FOD and DC) with the flag `dim_status`. * However, in our user-space implementation of FOD, the `dim_status` flag is only set AFTER the FOD icon has been pressed by the user, unlike in official ROM where they enable dimming whenever the FOD icon shows up which breaks the image quality terribly. Our different order caused the userspace code to read the alpha value before the flag is actually set, and thus being incorrect, causing severe blinking when using FOD. * Fix this by defaulting to using the flag `op_dimlayer_bl_enable` for distinguishing between FOD and DC, so as long as DC dimming is not enabled (which is always the case because we haven't even implemented DC dimming in our userspace), the value read by userspace is always the one for FOD. If we were ever to implement DC dimming, we should probably separate these two interfaces to two sysfs nodes instead of sharing a common one to avoid confusion. Change-Id: I1aa2bdad330a6b555f7025e6fff3fa1684052726
Loading
Please register or sign in to comment