• Nicholas Kazlauskas's avatar
    drm/amd/display: Do VRR transition before enable_crc_interrupts · 057be086
    Nicholas Kazlauskas authored
    [Why]
    Originally we did the amdgpu_dm_handle_vrr_transition call before
    interrupts were enabled. After the interrupt toggling logic was
    moved around for support enabling CRTCs with no primary planes
    active this was no longer being called in the case where there
    wasn't a modeset.
    
    This fixes failures in igt@kms_vrr@* with error
    "Timed out: Waiting for vblank event".
    
    [How]
    Shift them back into the loop that always ran before interrupts were
    enabled.
    
    Pull out the logic that updated VRR state into the same loop since
    there's no reason these need to be split.
    
    In the case where we're going from VRR off, no planes to VRR on, some
    active planes we'll still be covered for having the VRR vupdate
    handler enabled - vblank will be re-enabled at this point, it will
    see that VRR is active and set the vupdate interrupt on there.
    Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Reviewed-by: default avatarDavid Francis <David.Francis@amd.com>
    Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    057be086
amdgpu_dm.c 191 KB