Status of the DRM update

  • Thread starter Thread starter Jean-Sébastien Pédron
  • Start date Start date
Status
Not open for further replies.
J

Jean-Sébastien Pédron

Guest
The i915 kernel video driver refresh, committed two weeks ago, was enough to finally make Intel GPUs to start working with the update to the DRM device-independent code being prepared.

More than its age, the problem of our DRM kernel subsystem is its inconsistency:

  • The i915 driver matches Linux 3.5.
  • The Radeon driver comes from Linux 3.8.
  • The device-independent code is a mix of the legacy FreeBSD DRM code (sys/dev/drm) and some bits taken from an unknown version of Linux.

This makes updates very difficult to do because none of the drivers are on the same page.

The goal of this project is to bring the DRM device-independent code to Linux 3.8, the same version than the Radeon driver. It’s working well for more than a year, but couldn’t be committed because the i915 driver wouldn’t work with a newer DRM.

Thanks to the i915 update, it is working now, even if the driver only matches Linux 3.5. However, there are still some issues to review and fix:

  • In Linux, there’s a global DRM lock, mostly used during device attach/detach. In FreeBSD, the device lock was used instead. This caused many functions to be changed to avoid recursive locking (because they used the device lock). With the DRM update, I’m restoring the global DRM lock but there are still places where the locking is wrong: I need to review all of them.
  • Another problem is returned error codes. In Linux, they use negative integers. In FreeBSD, functions were modified to use positive integers. To reduce the diff, I’m restoring the negative integers inside the DRM subsystem. I just convert them to positive ones at the last moment, when the DRM subsystem interacts with other FreeBSD components. Again, this needs a thorough review.
  • This work is happening in my “kms-drm-update-38″ branch on GitHub (branched from 11-CURRENT, frequently updated). Only the kernel is relevant, no need to rebuild world. Please test it as much as you can and report back to the freebsd-x11@ mailing-list!
Continue reading...
 
Status
Not open for further replies.
Back
Top