• Nicholas Kazlauskas's avatar
    drm/amd/display: Drop dm_determine_update_type_for_commit · f6d7c7fa
    Nicholas Kazlauskas authored
    [Why]
    This was added in the past to solve the issue of not knowing when
    to stall for medium and full updates in DM.
    
    Since DC is ultimately decides what requires bandwidth changes we
    wanted to make use of it directly to determine this.
    
    The problem is that we can't actually pass any of the stream or surface
    updates into DC global validation, so we don't actually check if the new
    configuration is valid - we just validate the old existing config
    instead and stall for outstanding commits to finish.
    
    There's also the problem of grabbing the DRM private object for
    pageflips which can lead to page faults in the case where commits
    execute out of order and free a DRM private object state that was
    still required for commit tail.
    
    [How]
    Now that we reset the plane in DM with the same conditions DC checks
    we can have planes go through DC validation and we know when we need
    to check and stall based on whether the stream or planes changed.
    
    We mark lock_and_validation_needed whenever we've done this, so just
    go back to using that instead of dm_determine_update_type_for_commit.
    
    Since we'll skip resetting the plane for a pageflip we will no longer
    grab the DRM private object for pageflips as well, avoiding the
    page fault issued caused by pageflipping under load with commits
    executing out of order.
    Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Reviewed-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    f6d7c7fa
amdgpu_dm.c 253 KB