I encountered a Pi 5 that reports hwver = 0xd04171 and, therefore, resulted in a code -3 error in ws2811_init from the Python wrapper. This is the output from cat /proc/cpuinfo on that Pi 5:
Revision : d04171
Serial : ***************
Model : Raspberry Pi 5 Model B Rev 1.1
To fix this issue, I would suggest to add the following lines to rpihw.c:
{
.hwver = 0xd04171,
.type = RPI_HWVER_TYPE_PI5,
.periph_base = 0, // uses kernel driver
.videocore_base = 0, // uses kernel driver
.desc = "Pi 5 Model B Rev 1.1 - 8GB",
},