News for hackers. Stuff that matters.
Re:AMD Open-Source GPU Kernel Driver Above 5M Lines, Entire ... by jmole on Thursday August 31, 2023 @03:07PM (#37342209)
Right, if you have 7 different architectures, each with it's own register map, and then model-specific tweaks, you're going to have a ton of code like that.
Re:AMD Open-Source GPU Kernel Driver Above 5M Lines, Entire ... by undersuit on Thursday August 31, 2023 @03:51PM (#37342781)
We could just compile it into a proprietary blob like Nvidia! /s
Re:AMD Open-Source GPU Kernel Driver Above 5M Lines, Entire ... by benlwalker on Thursday August 31, 2023 @04:35PM (#37343359)
Is it really that much code? I don't know GPU hardware, but the NVMe spec header file in SPDK is around 4k lines[0]. If there's 7 of them and they're twice as complicated each, we're still well under 100k from register map headers. I didn't actually look through Linux to see how big they are, so maybe it is that much more complex.

0: https://github.com/spdk/spdk/blob/master/include/spdk/nvme_s...

Re:AMD Open-Source GPU Kernel Driver Above 5M Lines, Entire ... by StillBored on Thursday August 31, 2023 @08:06PM (#37345156)
NVMe is largely the model people here are complaining about. A small kernel shim driver that is talking to a huge firmware code base on the other side of a mailbox interface.

Even on small m.2 style standalone drives, your looking at code, which not only handles the details of managing flash error correction, wear leveling, garbage collection, etc, etc, but all the code required to manage the thermal, voltage, pcie link training, etc of the 2-5 or so microcontrollers embedded in the drive and possibly an RTOS or two hosting it all.

Never mind fabric attach (DPU?) NVMe devices which do all that, plus deal with thin provisioning, partitioning, deduplication, device sharing, replication, RAID, etc, etc. Frequently themselves embedding a Linux (or similar level of complexity OS) kernel in the control plane.

Re:AMD Open-Source GPU Kernel Driver Above 5M Lines, Entire ... by scns on Thursday August 31, 2023 @04:58PM (#37343593)
> if you have 7 different architectures

GPU or CPU? If talking about the latter only two [four] should count (ARM & x86 [+ [* 2 64BitVersion]]. If you meant the former forget my comment.

Re:AMD Open-Source GPU Kernel Driver Above 5M Lines, Entire ... by userbinator on Thursday August 31, 2023 @08:08PM (#37345183)
Do they modify where all the registers are and the meaning of their bits with each new generation? That seems like an extremely wasteful way to do things.

I'm not familiar with AMD's GPUs, but have done some "bare metal" Intel GPU programming, and there's definitely a lot of commonality between different generations going all the way back to the i810.