xfree86: Call ScreenInit for protocol screens before GPU screens
During startup, the xfree86 DDX's InitOutput()
calls PreInit
for
protocol screens first, and then GPU screens. On teardown, dix_main()
calls CloseScreen
in the reverse order: GPU screens first starting with
the last one and then working backwards, and then protocol screens also
in reverse order.
InitOutput()
calls ScreenInit
in the wrong order: for GPU screens first
and then for protocol screens. This causes a problem for drivers that
have global state that is tied to the first screen that calls ScreenInit
.
Fix this by simply re-ordering the for loops to call PreInit
for
protocol screens first and then for GPU screens second.