xserver-multidpi/hw/xfree86
Kishore Kadiyala 54f9af1c61 modesetting: keep going if a modeset fails on EnterVT
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: Kishore Kadiyala <kishore.kadiyala@intel.com>
Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
Closes: #1010
(cherry picked from commit efb3abddd4)
2020-12-01 11:13:51 +01:00
..
common Add xf86OSInputThreadInit call from common layer into os-support layer 2020-01-13 22:25:39 +00:00
ddc xfree86: add drm modes on non-GTF panels 2020-08-18 04:12:09 +00:00
dixmods miinitext: Load GLX on the mi path 2018-02-14 17:04:48 -05:00
doc docs: remove resource management references 2018-04-02 14:10:58 -04:00
dri hw/xfree86: unvalidated lengths 2017-10-10 23:33:44 +02:00
dri2 dri2: Sync i965_pci_ids.h from mesa 2019-07-26 19:44:03 +00:00
drivers modesetting: keep going if a modeset fails on EnterVT 2020-12-01 11:13:51 +01:00
exa meson: Install man pages 2018-03-27 10:28:33 -04:00
fbdevhw xfree86: fix readlink call 2018-10-16 10:22:05 -04:00
glamor_egl glamor: Make Xv extension initialize at depth 30. 2018-02-27 10:18:06 -05:00
i2c Add a Meson build system alongside autotools. 2017-04-26 15:25:27 -07:00
int10 meson: Silence -Wformat-nonliteral for x86emu 2017-10-20 13:15:35 -04:00
loader Use ARRAY_SIZE all over the tree 2017-10-30 13:45:20 -04:00
man Update URL's in man pages 2020-08-18 04:12:08 +00:00
modes xfree86: add drm modes on non-GTF panels 2020-08-18 04:12:09 +00:00
os-support Revert "linux: Make platform device probe less fragile" 2020-09-08 10:50:38 +02:00
parser os, xfree86: Stop being so weird about <limits.h> 2017-05-12 09:49:07 -04:00
ramdac xfree86: Take second reference for SavedCursor in xf86CursorSetCursor 2020-09-30 15:06:30 +00:00
shadowfb meson: Fix linkage of loadable modules for PE/COFF 2017-10-12 15:22:04 -04:00
utils gtf: Warning fix 2018-04-05 14:18:16 -04:00
vbe meson: Build libvbe.so 2017-04-27 15:19:45 -04:00
vgahw meson: Build libvgahw.so 2017-04-27 15:19:41 -04:00
x86emu x86emu: Teach the debug code about varargs 2018-01-16 16:08:38 -05:00
xkb Move statically linked xorgxkb files from dixmods to a separate directory 2017-06-27 12:42:06 -04:00
.gitignore Xorg: Add Xorg.wrap to hw/xfree86/.gitignore 2014-04-18 11:39:16 +02:00
Makefile.am xfree86: Makefile shouldn't rely on superuser being named 'root' 2018-06-19 09:52:45 -04:00
meson.build meson: don't install xorg wrapper manpages if suid-wrapper isn't being used 2018-06-19 09:52:17 -04:00
sdksyms.sh sdksyms: Cope with __pid_t and __uint32_t 2018-04-23 14:56:17 -04:00
xorg-wrapper.c suid: Include sysmacros.h to fix build after glibc-2.25 2017-09-25 13:04:25 -04:00
Xorg.sh.in xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
xorgconf.cpp xfree86: fix wrong DontZap documentation (#71113) 2014-05-24 20:02:56 +10:00