• Jun Lei's avatar
    drm/amd/display: fixup DPP programming sequence · f7f38ffe
    Jun Lei authored
    [why]
    DC does not correct account for the fact that DPP DTO is double buffered while DPP ref is not.
    This means that when DPP ref clock is lowered when it's "safe to lower", the DPP blocks that need
    an increased divider will temporarily have actual DPP clock drop below minimum while DTO
    double buffering takes effect.  This results in temporary underflow.
    
    [how]
    To fix this, DPP clock cannot be programmed atomically, but rather be broken up into the DTO and the
    ref.  Each has a separate "safe to lower" logic.  When doing "prepare" the ref and dividers may only increase.
    When doing "optimize", both may decrease.  It is guaranteed that we won't exceed max DPP clock because
    we do not use dividers larger than 1.
    Signed-off-by: default avatarJun Lei <Jun.Lei@amd.com>
    Reviewed-by: default avatarEric Yang <eric.yang2@amd.com>
    Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    f7f38ffe
dcn20_dccg.c 4.94 KB