KMS Locking Pulled Into Queue For Linux 3.9 Kernel

Written by Michael Larabel in Intel on 7 February 2013 at 12:58 PM EST. Add A Comment
INTEL
Intel's work on kernel mode-setting locking has been pulled into the drm-next repository for merging into the Linux 3.9 kernel as one of several open-source Linux graphics driver changes for this next kernel release.

As far as what KMS locking means for users, Daniel Vetter has described it in a detailed blog post. Vetter explains, "The aim of this locking rework is that ioctls which a compositor should be might call for every frame (set_cursor, page_flip, addfb, rmfb and getfb/create_handle) should not be able to block on kms background activities like output detection. And since each EDID read takes about 25ms (in the best case), that always means we'll drop at least one frame. The solution is to add per-crtc locking for these ioctls, and restrict background activities to only use the global lock. Change-the-world type of events (modeset, dpms, ...) need to grab all locks."

However, making this locking work right isn't too easy. There's still some work ahead before there's "perfect page-flip" support for the Linux kernel. "The downside of this all is that we can now enable some really paranoid inter-frame jitter checks and vblank counter timestamp checks in the kms_flip testcase. After all, no frames should be dropped any longer. But it turns out that a lot of the different platforms still have small issues here and there with races and other inconsistencies like completing a page flip immediately right after a modeset. So there's still plenty of work to do until we have perfect pageflip support. And there's also a few funny issues like racing gpu hangs against pageflips, client crashes against pageflips or trying to flip overlays and cursor on the same vblank as the underlying framebuffer."

Other Linux 3.9 DRM graphics features are covered in Intel's Linux DRM Driver Plans For 2013, the no-reloc optimization, Haswell improvements, and several other changes.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week