The Size Of The Different Open-Source Linux DRM/Mesa Graphics Drivers
Written by Michael Larabel in Mesa on 31 October 2015 at 01:44 PM EDT. 8 Comments
MESA --
As there's been some discussion lately about the "size" of the different open-source Linux graphics drivers, here are some fresh looks at the rough code size of each of the main DRM/KMS kernel drivers as well as the Mesa/Gallium3D user-space drivers.

Just for some forum discussion and curiosity sake, with the latest DRM-Next and Mesa Git code as of today I ran some simple line counts on the different drivers. With the DRM driver testing, the respective folder was scanned for line count for the total lines -- including header files. Yes, that includes any code comments, etc, but is good enough for just getting a general size of the different Direct Rendering Manager drivers.


22-Way Comparison Of NVIDIA & AMD Graphics Cards On SteamOS For Steam Linux Gaming


David Airlie's DRM-Next Branch

i915 DRM: 126,357
Nouveau DRM: 150,359
Radeon DRM: 212,893
VMWgfx DRM: 38,702
MSM DRM: 43,243
AMDGPU DRM: 106,201
AMDGPU + AMDKFD + Scheduler DRM: 455,157

In the Mesa checks, the line counts were done for the respective drivers similar to the kernel DRM driver methodology. For the Gallium3D drivers, only the actual driver files were counted and not the winsys or other common areas.

Mesa Git Master

Freedreno Gallium3D: 41,265
LLVMpipe Gallium3D: 26,185
Nouveau NV30/NV50/NVC0 Gallium3D: 91,649
R300 Gallium3D: 39,051
R600 Gallium3D: 56,913
RadeonSI Gallium3D: 24,523 + (Shared Radeon Gallium3D Directory: 12,656)
Softpipe Gallium3D: 15,697
i915 Mesa DRI: 23,769
i965 Mesa DRI: 114,537

It's not entirely scientific as outlined above, but each of the drivers were measured in the same way from the latest Git code today. Also ignored were the driver-specific libdrm bits that interface between the Mesa/Gallium3D drivers and the DRM kernel drivers. So take the numbers as you wish and feel free to discuss by commenting on this article in our forums.
About The Author
Author picture

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 10,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 or contacted via MichaelLarabel.com.

Related Mesa News
Popular News This Week