• Rodrigo Vivi's avatar
    drm/i915: Make sure PSR is ready for been re-enabled. · 8d7f4fe9
    Rodrigo Vivi authored
    Let's make sure PSR is propperly disabled before to re-enabled it.
    
    According to Spec, after disabled PSR CTL, the Idle state might occur
    up to 24ms, that is one full frame time (1/refresh rate),
    plus SRD exit training time (max of 6ms),
    plus SRD aux channel handshake (max of 1.5ms).
    
    So if something went wrong PSR will be disabled until next full
    enable/disable setup.
    
    v2: The 24ms above takes in account 16ms for refresh rate on 60Hz mode. However
    on low frequency modes this can take longer. So let's use 50ms for safeness.
    
    v3: Move wait out of psr.lock critical area.
    
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
    Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
    Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
    Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    8d7f4fe9
intel_dp.c 148 KB