To your overall point though: do you think there's something better?
The operations required by user-mode drivers and APIs just don't map well to file operations. On the other hand, creating dedicated syscalls for graphics isn't very attractive either, because many of the ioctls are quite hardware-specific.
Using ioctls is a pragmatic solution, and I doubt you can really come up with something much better, though I'd be interested in being proven wrong.
There's netlink. It's "more structured", in that it has a lot more structures.
Modules of common subsystems already support the same ioctl structs where this makes sense. Any mechanism replacing ioctls would only change the way you call it, it cannot reduce the inherent differences between modules. Well, one could use D-Bus or some generic property / key-value system, but this would only be generic on the surface.
Just as a side node to your ioctl criticism, I don't say ioctls are great.
That's how things work in Windows as well. That's how userland talks to kernel mode drivers.
Well, except everything is an object.
GPU drivers are different. Basically, Windows have Direct3D already in the kernel, exposing relatively large API surface for the userland half of the driver.
https://docs.microsoft.com/en-us/windows-hardware/drivers/di...
Just look at the absolute abortion that is "netlink". Very deeply nested structures with self-referencing pointers and sizeofs everywhere. You are looking at 300 LoC for the most trivial operations unless you want to use a shitty (like extfs tools shitty) library.
I actually prefer the ioctl, it keeps the insanity in check of these structure astronauts that gave us netlink.