Hello again all,
I was wondering if any of you could point me to some resources to learn more about the process of porting the Linux DRM subsystem and GPU drivers over to OpenBSD (and Linux's DRM sub-system itself). How hard is it to import all that code to support modern Intel and AMD GPUs? What does OpenBSD do differently compared to Linux when using the DRM API?
I've had no issues with the GPU drivers on my modernish AMD GPU. But last night something went wonky with my ability to decode video using the GPU (playing video in mpv using yt-dlp). It fell back to using the CPU to render videos. I thought maybe yt-dlp needed an update because google broke things again but that was not the case. Later on I closed the browser I'd had open for weeks (Firefox) and it refused to run when I tried to start it again. It core dumped and threw an error related to the DRM subsystem that I didn't write down. Since I force enabled some stuff in about:config related to GPU acceleration.
I need to grep through logs to see if I can figure out what went wrong. I had a working system otherwise. A reboot fixed it but I'd never had this issue with OpenBSD before even if I left the system on for weeks. I wonder if it was related to it being suspended for multiple days.
All of this got me wondering about how the OpenBSD kernel interacts with modern GPUs and how much effort is required to port all that stuff over from Linux. I've heard modern GPU drivers are a mess (tons of code) but I've never tried looking at the code myself.