1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

First Phase Of X.Org GPU Hot-Plugging Works

X.Org

Published on 22 October 2011 07:26 PM EDT
Written by Michael Larabel in X.Org
9 Comments

David Airlie has demonstrated success in the first phase of his X.Org GPU/driver hot-plugging work, which eventually may lead to proper dynamic GPU switching under X.

On David Airlie's blog he has written briefly about his X.Org hot-plug work that he's been doing on and off for the past year. He's also included a video (embedded at the end of this post) that demonstrates this video hot-plugging work.

What's going on is using the xf86-video-modesetting driver with his custom X.Org Server work and xterm and GNOME Metacity. When he plugs in a USB-based DisplayLink adapter that's using his custom Linux kernel DRM driver, the USB-driven display lights up and is functional.

What goes on is that his custom X.Org Server code is started up with the respective drivers and David's major X.Org video driver ABI re-work comes into play here. One X protocol screen is exported and then when the GPU hot-plug happens, the xorg-server initializes another screen for the new device and plugs it into the single protocol screen. The driver-level pixmaps/pictures/GCs are copied to the new driver. The single protocol screen is then multi-plexed across the plugged in driver screens. David explains it as being "like Xinerama pushed down a lot further in the stack, so instead of doing iterations at the protocol level, we do it down at the acceleration level. Also I have randr code hooked up so all the outputs appear no matter what GPU they are from."

This demonstration is from a DisplayLink USB adapter, which doesn't have 3D hardware acceleration abilities. What Airlie eventually wants to get to is getting the main GPU to do the rendering and then only send the scan-out buffer to the USB device. This rendering-on-one-GPU-and-send-to-another could also be used for multi-GPU desktop systems to offload rendering work for one intensive OpenGL application/game to a secondary GPU and then piping the contents back to the primary graphics processor, among other possibilities.

While good progress has been made, David has been dabbling with this code for a year and there's still much more work ahead before we might see the code merged into mainline and deployed. "The real solution is a still a long ways off, but this is just a small light in a long tunnel, I've been hacking on this on/off for over a year now, so its nice to see something visible for the first time."

In terms of dynamic GPU switching for multi-GPU setups (such as NVIDIA Optimus and other notebooks with dual graphics processors), David says in a comment on his blog that the KMS drivers would need to be modified to work with the new X.Org Server for switching and such. Sharing of more kernel-level objects via PRIME or dmabuf is also needed.


About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux Hardware Reviews
  1. CompuLab Intense-PC2: An Excellent, Fanless, Mini PC Powered By Intel's i7 Haswell
  2. From The Atom 330 To Haswell ULT: Intel Linux Performance Benchmarks
  3. AMD Radeon R9 285 Tonga Performance On Linux
  4. Apotop Wi-Copy
Latest Linux Articles
  1. AMD Moves Forward With Unified Linux Driver Strategy, New Kernel Driver
  2. MSI: Update Your BIOS From The Linux Desktop
  3. NVIDIA vs. AMD 2D Linux Drivers: Catalyst Is Getting Quite Good At 2D
  4. 15-Way GPU Comparison With Mesa 10.3 + Linux 3.17
Latest Linux News
  1. Linux 3.18-rc1 Released One Week Early With Many Changes
  2. The VC4 Gallium3D Driver Is Still Moving Along For The Raspberry Pi
  3. Direct3D 9 Support Might Land Within Mainline Mesa 3D Drivers
  4. OpenGL Preview Benchmarks For NVIDIA's GeForce GTX 970
  5. HOPE: The Ease Of Python With The Speed Of C++
  6. Vitesse: Using LLVM To Speed Up Databases
  7. AMD Is Restructuring Again, Losing 7% Of Employees
  8. Linux Testing Of The NVIDIA GeForce GTX 970
  9. Qt 5.4 Now In Beta With Web, Bluetooth LE, Graphics Improvements
  10. AMD's Radeon R9 285 On Linux Offers Good OpenCL Performance
Latest Forum Discussions
  1. AMD Is Restructuring Again, Losing 7% Of Employees
  2. Bye bye BSD, Hello Linux: A Sys Admin's Story
  3. NVIDIA Presents Its Driver Plans To Support Mir/Wayland & KMS On Linux
  4. Open-Source AMD Fusion E-350 Support Takes A Dive
  5. Upgrade to Kaveri, very slow VDPAU performance
  6. ChromeOS Drops Support For EXT2/EXT3/EXT4 File-Systems
  7. Lennart Poettering On The Open-Source Community: A Sick Place To Be In
  8. The Slides Announcing The New "AMDGPU" Kernel Driver