xserver/hw
Mario Kleiner efe9e3e9ff modesetting: Fix fallback for lack of new vblank kernel API.
Turns out that the kernel DRM ioctl handling returns EINVAL
instead of ENOTTY if one tries to call the new drmCrtcGetSequence()
or drmCrtcQueueSequence() ioctl's introduced in Linux 4.15 on an
older kernel where they are missing. This causes the fallback code
not to fall back to the old drmWaitVblank() ioctl and thereby
failure of vblank stuff.

E.g., on Linux 4.13, glxgears -info runs unthrottled at 10000 fps
instead of 60 fps. Also breakage of OML_sync_control extension.

Check for errno != EINVAL before setting has_queue_sequence = TRUE.

Additionally in case of supported drmCrtcQueueSequence(), set
has_queue_sequence = TRUE on success, or we might get at
least a temporary failure in ms_queue_vblank().

One slight ambiguity is that we can also get EINVAL if
drm_crtc_vblank_get() fails in the kernel, so if that
happened at first invocation of the new api, we'd fall
back to drmWaitVblank() and then fail there, instead of
failing in the new api, but the end result would be the
same.

Fixes: 44d5f2eb8a ("xf86-video-modesetting: Support new vblank kernel API [v2]")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Keith Packard <keithp@keithp.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-02-27 10:02:05 -05:00
..
dmx dmx: warning fix 2018-02-14 17:21:43 -05:00
kdrive Xephyr: Avoid calling xcb_shm_detach() twice 2018-02-20 11:05:59 -05:00
vfb miinitext: Load GLX on the mi path 2018-02-14 17:04:48 -05:00
xfree86 modesetting: Fix fallback for lack of new vblank kernel API. 2018-02-27 10:02:05 -05:00
xnest miinitext: Load GLX on the mi path 2018-02-14 17:04:48 -05:00
xquartz xquartz: Fix linking with glxvnd 2018-02-26 14:13:40 -05:00
xwayland xwayland: Fix backwards need_rotate logic (v2) 2018-02-20 13:17:08 -05:00
xwin hw/xwin: Update for glxvnd 2018-02-19 12:44:04 -05:00
Makefile.am Xwayland DDX 2014-04-03 15:19:22 -07:00
meson.build meson: Move Xvfb build under an option. 2017-09-20 13:19:21 -04:00