• Modern AMD Graphics Driver Surpasses Six Million Lines Of Code In Linux 7.0 It was less than four years ago that the modern AMDGPU/AMDKFD open-source driver stack was at four million lines of C code and header files. • Now with the Linux 7.0 kernel it has surpassed six million lines. • Or put another way, by the same calculations Linux 7.0-rc1 is at 39.2 million with the modern AMD kernel graphics driver now making up 15% of the kernel’s entire codebase as the single largest driver. • With the current Linux 6.19 stable kernel the drivers/gpu/drm/amd/ directory is at 5,937,130 lines comprised of 5,110,038 detected lines of code, another 618,113 lines of code comments, and 20,8979 blank lines in the code files. • The drivers/gpu/drm/amd/ directory consists of both the AMDGPU kernel graphics driver as well as the AMDKFD kernel compute driver for both the Radeon/Instinct compute support used by the (not counted) ROCm user-space. • It doesn’t include the old classic Radeon legacy driver (drivers/gpu/drm/radeon/) that is mainly used for pre-GCN hardware support.

Article Summaries:

  • The Linux 7.0 kernel has pushed the AMDGPU/AMDKFD open‑source graphics stack past six million lines of code, making it the largest single driver in the kernel and accounting for roughly 15 % of the total codebase. The cloc tool reports 6,048,151 detected lines-5,202,309 code, 631,591 comments, and 214,251 blanks-across 2,694 files. Much of the growth comes from auto‑generated header files that document each GPU target. Linux 7.0‑rc1 totals over 29 million lines, and the new release adds support for upcoming AMD hardware while expanding the driver’s footprint.
  • Modern AMD Graphics Driver Surpasses Six Million Lines Of Code In Linux 7.0

The AMDGPU/AMDKFD open‑source driver stack has grown from roughly 4 million lines in 2023 to over 6 million lines in the Linux 7.0 kernel, making it the largest single driver in the kernel (≈15 % of the codebase). Linux 7.0‑rc1 totals 39.2 million lines, with the AMD driver contributing 5.2 million lines of code, 631 k comments, and 214 k blank lines across 2,694 files. The increase is largely due to auto‑generated header files that document each GPU target. Linux 7.0 also adds support for upcoming AMD graphics hardware.

Sources: