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. Even With Re-Clocking, Nouveau Remains Behind NVIDIA's Proprietary Linux Driver
  2. The Power Consumption & Efficiency Of Open-Source GPU Drivers
  3. AMD R600g/RadeonSI Performance On Linux 3.16 With Mesa 10.3-devel
  4. Intel Pentium G3258 On Linux
Latest Linux Articles
  1. AMD Catalyst 14.6 Does Slightly Better With APITest OpenGL Tests
  2. Updated Source Engine Benchmarks On The Latest AMD/NVIDIA Linux Drivers
  3. Nouveau vs. Radeon vs. Intel Tests On Linux 3.16, Mesa 10.3-devel
  4. KVM Benchmarks On Ubuntu 14.10
Latest Linux News
  1. SteamOS Beta 126 Better Handles XBMC
  2. Ubuntu 14.10 Alpha 2 Released
  3. KDE 4.14 Release Candidate Ships
  4. Drivers & Drama Dominated Linux Talk In July
  5. Fedora Assembles A Security Team
  6. AMD Launches The A10-7800, The 65 Watt Kaveri
  7. Builder: A New Development IDE Being Built For GNOME
  8. GDB 7.8 Betters Python Scripting, Adds Guile Support
  9. GNOME's GTK+ Is Still Striving For A Scene Graph, Canvas API
  10. Unreal Tournament Looks Great For Team Deathmatch
Latest Forum Discussions
  1. Linus Torvalds On GCC 4.9: Pure & Utter Crap
  2. Updated and Optimized Ubuntu Free Graphics Drivers
  3. Grand Theft Auto Running On Direct3D Natively On Linux Shows Gallium3D Potential
  4. Updated graphics drivers for Ubuntu 12.04 Precise LTS
  5. Debian + radeonsi
  6. AMD Publishes Open-Source Linux HSA Kernel Driver
  7. Open-source drivers on ATI R7 260X
  8. AMD Athlon 5350 APU On Linux