Skip to content
  • David Francis's avatar
    tests/amdgpu: Add test for Adaptive Backlight Management · 738f43a5
    David Francis authored and Harry Wentland's avatar Harry Wentland committed
    
    
    Adaptive Backlight Management (ABM) is a power-saving
    feature on AMD ASICs that reduces backlight while increasing
    pixel contrast and luminance.  This test confirms that
    ABM is present and enabled, and that backlight performance
    is sane.  It uses AMD-specific debugfs entries to
    read the backlight PWM values.
    
    It has 5 subtests:
    
    dpms_cycle
    Sets brightness to half, then confirms that value is restored
    after dpms off and then on.
    
    backlight_monotonic_basic
    Sets brightness to ten different values, confirming that
    higher brightness values are brighter.
    
    backlight_monotonic_abm
    Same as backlight_monotonic_basic, but with abm enabled.
    
    abm_enabled
    Sets abm to its four intensity levels, confirming that
    abm reduces the backlight, and the reduction is greater
    for higher abm level.
    
    abm_gradual
    Sets abm to off and then maximum intensity, confirming
    that brightness decreases continually over the first
    second and eventually reaches the target value.
    This test takes 30s to run.
    
    v2: make sure that dpms is cycled on the eDP display
    
    Signed-off-by: default avatarDavid Francis <David.Francis@amd.com>
    Reviewed-by: Leo Li's avatarLeo Li <sunpeng.li@amd.com>
    738f43a5