drm - Move startup delay to VERSION ioctl
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 4 May 2019 21:15:30 +0000 (14:15 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 4 May 2019 21:15:30 +0000 (14:15 -0700)
commit45a165c7ada0f9a1ca54d3a1c8d855e7cb767efe
treeb4de24619b0496e358936d59ac3b2a1ba51e675b
parentd60b58c88359cf8ba48202b23b9508c021ad74e7
drm - Move startup delay to VERSION ioctl

* We had a startup delay in the i915 attach path, which is
  synchronous with the kldload that X does.  Unfortunately, this
  doesn't appear to work well, probably because it just stalls
  everything and leaves the race intact after the sleep returns.
  Also, the kld lock is held across the sleep.

* Move the startup delay to the first call of the DRM_IOCTL_VERSION
  ioctl.  This is outside the kld path allows drm to free-run while
  simply imposing a short delay on the X startup to give the drm
  system time to stabilize.

* Should fix several intel i915 startup issues that can leave the
  screen corrupt, and perhaps other startup issues.
sys/dev/drm/drm_ioctl.c
sys/dev/drm/i915/i915_drv.c