• Peter Cai's avatar
    drm: msm: default to FOD dimming when calculating alpha · 268d654d
    Peter Cai authored
    * 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
    268d654d
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
techpack Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
Android.mk Loading commit data...
AndroidKernel.mk Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
build.config.cuttlefish.x86_64 Loading commit data...
build.config.goldfish.arm Loading commit data...
build.config.goldfish.arm64 Loading commit data...
build.config.goldfish.mips Loading commit data...
build.config.goldfish.mips64 Loading commit data...
build.config.goldfish.x86 Loading commit data...
build.config.goldfish.x86_64 Loading commit data...
readme_tmo.txt Loading commit data...
verity_dev_keys.x509 Loading commit data...