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. Scythe Mugen MAX
  2. Intel Core i7 5960X Haswell-E On Linux
  3. Intel 80GB 530 Series M.2 SSD On Linux
  4. With A New Motherboard, The Core i7 5960X Haswell-E Lights Up
Latest Linux Articles
  1. A Tour Of The New Phoronix Office
  2. 7-Way Linux Desktop Gaming Comparison On Ubuntu 14.10
  3. Intel P-State vs. CPUFreq Benchmarks On The i7-5960X
  4. RadeonSI GLAMOR Benchmarks With X.Org Server 1.16
Latest Linux News
  1. X.Org Server 1.16.1 Released
  2. Mesa Gets Closer To Having OpenGL 4.0 Tessellation Support
  3. Uselessd: A Stripped Down Version Of Systemd
  4. F2FS Tools Gain FSCK Support
  5. FreeBSD 10.1 Has The New VT Driver, Hardware Improvements
  6. AntiMicro 2.6 Yields Greater Compatibility For Gamepads On Linux
  7. OpenGL 3.3 / GLSL 3.30 Lands For Intel Sandy Bridge On Mesa
  8. AMD's RadeonSI Gallium3D Driver Sees Some Improvements
  9. Mesa 10.3 Released With The Latest Open-Source GPU Driver Improvements
  10. GNOME 3.13.92 Officially Released
Latest Forum Discussions
  1. ASRock AM1H-ITX: One Of The Best AM1 Mini-ITX Motherboards
  2. Wasteland 2 Officially Launched Today, Including For Linux Gamers
  3. Can Linux kill a motherboard?
  4. X.Org Women Outreach Program Only Turns Up Two Applicants So Far
  5. New stress testing utility for GPU's
  6. Stop grabbing my keyboard :(
  7. New Group Calls For Boycotting Systemd
  8. SSD seems slow