• Kishore409's avatar
    modesetting: keep going if a modeset fails on EnterVT · efb3abdd
    Kishore409 authored
    There was a time when setting a mode on a CRTC would not depend on the
    associated connector's state. If a mode had been set successfully once,
    it would mean it would work later on.
    
    This changed with the introduction of new connectors type that now
    require a link training sequence (DP, HDMI 2.0), and that means that
    some events may have happened while the X server was not master that
    would then prevent the mode from successfully be restored to its
    previous state.
    
    This patch relaxes the requirement that all modes should be restored on
    EnterVT, or the entire X-Server would go down by allowing modesets to
    fail (with some warnings). If a modeset fails, the CRTC will be
    disabled, and a RandR event will be sent for the desktop environment to
    fix the situation as well as possible.
    
    Additional patches might be needed to make sure that the user would
    never be left with all screens black in some scenarios.
    
    v2 (Martin Peres):
     - whitespace fixes
     - remove the uevent handling (it is done in a previous patch)
     - improve the commit message
     - reduce the size of the patch by not changing lines needlessly
     - return FALSE if one modeset fails in ignore mode
     - add comments/todos to explain why we do things
     - disable the CRTCs that failed the modeset
    Signed-off-by: Kishore409's avatarKishore Kadiyala <kishore.kadiyala@intel.com>
    Signed-off-by: Martin Peres's avatarMartin Peres <martin.peres@linux.intel.com>
    Reviewed-by: Daniel Vetter's avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    Tested-by: Kishore409's avatarKishore Kadiyala <kishore.kadiyala@intel.com>
    Closes: #1010
    efb3abdd
driver.c 59.7 KB