/news/linux-7-3-rc1-nears-41-million-lines-as-amd-gpu-driver-hits-6-5-million-a8b54e9e

Linux 7.3-rc1 Nears 41 Million Lines As AMD GPU Driver Hits 6.5 Million

A fresh cloc run on the Linux 7.3-rc1 tree shows the kernel at 40.98 million lines, with drivers/gpu/drm/amd alone at 6.52 million lines — roughly 16% of the entire kernel, driven largely by DCN 6.0 register headers.

The numbers

Michael Larabel ran cloc against the Linux Git tree at the v7.3-rc1 tag. Result: the kernel is now 40.98 million lines total, up from 40.42 million at Linux v7.2. That break-down is 30,937,090 lines of detected code, 4,912,366 lines of comments, and 5,134,418 blank lines. On the current trajectory, Linux 7.4 will clear 41 million lines without much effort.

The more striking figure is the AMD kernel graphics stack. drivers/gpu/drm/amd — which includes the AMDGPU driver, the AMDKFD compute driver, display code, and the associated header files — measured 6.52 million lines, up from 6.35 million in v7.2. That is roughly 16% of the entire kernel source tree in a single driver directory. It even understates AMD's share slightly, since the classic Radeon DRM driver for pre-GCN hardware lives outside that directory and was not counted.

Why this -rc1 is unusually big

Linus Torvalds addressed the size question directly in the 7.3-rc1 announcement. A large share of the diff comes down to another hardware register dump:

"This is yet another one of those releases with a big AMD GPU register dump. This time it's the AMD DCN6 register headers. They're huge. As usual. That's what you get when you dump all the hardware definitions as C header #defines. There's also the accompanying code for the new gen. All in all, that AMD GPU code and header dump accounts for about a third of the whole rc1 patch."

That is the pattern with each new AMD display generation. DCN 6.0 — the next display core IP block for upcoming graphics hardware — arrives as a massive set of C header #define lines describing every hardware register, plus the code to drive it. This is simply how AMD's hardware definitions land upstream, and it reliably inflates the diff stat every cycle.

What it means for the tree

A third of a merge-window's changes being register headers and new-generation IP code is not new, but the cumulative effect is now measurable in round numbers. The 6.35M-to-6.52M jump in drivers/gpu/drm/amd between v7.2 and 7.3-rc1 — about 170,000 lines in one cycle — shows how much of the kernel's steady growth is one driver family. For build and CI systems, kernel image size is affected far less than the raw line count suggests (most of these lines are headers), but tree indexing, code search, and static analysis workloads all scale with the line count.

For engineers tracking kernel growth or hardware enablement, the takeaway is straightforward: the kernel crossed 40 million lines earlier this year, sits at 40.98 million as of 7.3-rc1, and the single largest contributor is the modern AMD graphics stack at 6.52 million lines and growing with every new IP generation.

Comments

Sign in or create an account to leave a comment.

Sign inCreate account

0 comments

No comments yet.