It sounds like we need to implement a wrapping-paper thin layer in
libdrm
that unpacks drmIoctl() and fans out all the combinations of proper
RPCs;
it will be ugly but doable. (I was hoping we could just pass in a
casted struct as that is what an ioctl is for). This is more work,
but probably simplest.
That's what I think. Compared to rewriting the whole graphics stack
(supposing we write something replacing drm, then we need a new mesa),
the UGLY is more acceptable, I think.
But based on what you have done, I think it should be a little easier
now than from scratch, as you have already migrated most structs and
functions.