Similar to #16, but much more involved. Screen setup involves many more X-protocol-level resources (which is arguably a bug itself), and device initialization can fail in many more interesting ways than the input case. Some notes and themes:
- All DDXes have a "configuration" phase, even if it's just command line parsing. DMX and Xorg would benefit if configuration phase was explicit instead of conditionally run if
serverGeneration == 1.
- Pixmap format setup can be simplified quite a bit, it looks very similar across DDXes.
- Phases tend to be: ddx early setup, probe for each driver, ddx middle stuff, screen init for each successfully probed driver, ddx finalize. Not all DDXes have all the same pieces in the same order, or do anything in each stage.
I've summarized the steps for each DDX here: InitOutput
The goal is to align the phases for each DDX to look enough like each other that we can hoist the body of InitOutput to DIX.