• Nicholas Kazlauskas's avatar
    drm/amd/display: Reset plane for anything that's not a FAST update · dc4cb30d
    Nicholas Kazlauskas authored
    
    
    [Why]
    MEDIUM or FULL updates can require global validation or affect
    bandwidth. By treating these all simply as surface updates we aren't
    actually passing this through DC global validation.
    
    [How]
    There's currently no way to pass surface updates through DC global
    validation, nor do I think it's a good idea to change the interface
    to accept these.
    
    DC global validation itself is currently stateless, and we can move
    our update type checking to be stateless as well by duplicating DC
    surface checks in DM based on DRM properties.
    
    We wanted to rely on DC automatically determining this since DC knows
    best, but DM is ultimately what fills in everything into DC plane
    state so it does need to know as well.
    
    There are basically only three paths that we exercise in DM today:
    
    1) Cursor (async update)
    2) Pageflip (fast update)
    3) Full pipe programming (medium/full updates)
    
    Which means that anything that's more than a pageflip really needs to
    go down path #3.
    
    So this change duplicates all the surface update checks based on DRM
    state instead inside of should_reset_plane().
    
    Next step is dropping dm_determine_update_type_for_commit and we no
    longer require the old DC state at all for global validation.
    
    Optimization can come later so we don't reset DC planes at all for
    MEDIUM udpates and avoid validation, but we might require some extra
    checks in DM to achieve this.
    Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Reviewed-by: default avatarHersen Wu <hersenxs.wu@amd.com>
    Reviewed-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    dc4cb30d
amdgpu_dm.c 258 KB