xfree86/common: Add a complete set of verbose checks for claiming video devices #1603
+141
−34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is an enhanced version of #1564 (+2 commits) and will be rebased once the latter is merged. Its goal is to show the complete picture how GPU assignment and initialization process should (IMO) look to a user - verbose enough, with no need for GDB debugging if something goes wrong.
Only after this have I found a bug that could not be noticed otherwise. It turned out that multiseat (several layouts working simultaneously) was possible just because of a bug, and, if it is corrected, multiseat gets inoperable.
Here is a snippet of
Xorg.0.log(on a single-seat machine, everything is OK) cut off right now:A few lines of output added to logs give a user some understanding what is going on and why. Apart from increased verbosity, the four commits prevent Xserver from claiming the same device by differrent drivers (the 1st and 2nd commits for platform, PCI, and framebuffer slots) and from claiming the same secondary CRT screen (for multi-CRT cards) more than once and if a primary CRT screen has not been set (this implements a FIXME hanging in the code, the 3rd commit for PCI slots and the 4th one for platform slots). Now I hope that almost all conflicts in claiming devices are impossible, while this does not restrict a user from choosing complex but legal configurations.
This PR is a basis for resolving an issue with multiseat.