• Nikola Cornij's avatar
    drm/amd/display: Map ODM memory correctly when doing ODM combine · ec5b356c
    Nikola Cornij authored
    [why]
    Up to 4 ODM memory pieces are required per ODM combine and cannot
    overlap, i.e. each ODM "session" has to use its own memory pieces.
    The ODM-memory mapping is currently broken for generic case.
    
    The maximum number of memory pieces is ASIC-dependent, but it's always
    big enough to satisfy maximum number of ODM combines. Memory pieces
    are mapped as a bit-map, i.e. one memory piece corresponds to one bit.
    The OPTC doing ODM needs to select memory pieces by setting the
    corresponding bits, making sure there's no overlap with other OPTC
    instances that might be doing ODM.
    
    The current mapping works only for OPTC instance indexes smaller than
    3. For instance indexes 3 and up it practically maps no ODM memory,
    causing black, gray or white screen in display configs that include
    ODM on OPTC instance 3 or up.
    
    [how]
    Statically map two unique ODM memory pieces for each OPTC instance
    and piece them together when programming ODM combine mode.
    Signed-off-by: default avatarNikola Cornij <nikola.cornij@amd.com>
    Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
    Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    ec5b356c
dcn20_optc.c 14.9 KB