AMD's Open Source GPU Kernel Driver Exceeds 5 Million Lines of Code

Technology media Phoronix did some cloc statistics on AMD's Linux kernel graphics driver code, especially the  drivers/gpu/drm/amd/  module, which contains modern code around the AMDGPU DRM driver, including AMDKFD computing, for Code shown, common headers, etc. (but not  older "Radeon" drivers in drivers/gpu/drm/radeon/ ).

According to statistics, the open source AMD Linux kernel graphics driver has more than 5 million lines of code:

Most of it is auto-generated headers , of course, and a big part of that is that AMD keeps introducing new auto-generated headers with each generation/new version of each given block. These lengthy header files have become an alternative to the exhaustive public documentation AMD creates for its GPUs.

Meanwhile, Nvidia's open source "Nouveau" driver is roughly 200,000+ lines (20,000+ blank lines, 24,000 comments, and 155,000 lines of code). The Intel i915 DRM kernel graphics driver passes the same cloc statistics, about 381,000 lines.

The above is just the kernel graphics driver code and does not include all the code in Mesa that provides OpenGL and Vulkan driver support or other userspace components.

As of now, the entire Linux kernel source tree is approximately 34.8 million lines, including documentation, various in-tree utilities/tools, other aids, etc.

Guess you like

Origin www.oschina.net/news/256417/amd-5-million-lines