• Jimmy Kizito's avatar
    drm/amd/display: Fix dynamic encoder reassignment · 0d4b4253
    Jimmy Kizito authored
    [Why]
    Incorrect encoder assignments were being used while applying a new state
    to hardware.
    
    (1) When committing a new state to hardware requires resetting the
    back-end, the encoder assignments of the current or old state should be
    used when disabling the back-end; and the encoder assignments for the
    next or new state should be used when re-enabling the back-end.
    
    (2) Link training on hot plug could take over an encoder already in use
    by another stream without first disabling it.
    
    [How]
    
    (1) Introduce a resource context 'link_enc_cfg_context' which includes:
    - a mode to indicate when transitioning from current to next state.
    - transient encoder assignments to use during this state transition.
    
    Update the encoder configuration interface to respond to queries about
    encoder assignment based on the mode of operation.
    
    (2) Check if an encoder is already in use before attempting to perform
    link training on hot plug.
    Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
    Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
    Signed-off-by: default avatarJimmy Kizito <Jimmy.Kizito@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    0d4b4253
dcn20_hwseq.c 82.2 KB