config/output: Pick among all 8-bit and 10-bit formats #8345
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.
The usual 8-bit and 10-bit formats have a lot of variations:
A particular display is likely to support multiple of these, and as we need to allocate a buffer of a particular type to test it, we'd like to avoid doing too many unnecessary tests.
If we go off on the assumption that a display device generally supports a subset of format variations but otherwise support each variation equally well - that is, if both RGB and BGR is supported, they will either both succeed or both fail at any given time - then instead of trying all formats, we can simply pick one supported format within each format group to try. For example, XBGR2101010 and XRGB8888.
By being conservative in how many formats we try, we can aggressively expand the list of candidate formats to handle odd hardware.
We can get rid of the the conservative aspect if KMS ever grows the ability to commit-test a buffer format without allocating the buffer first, allowing us to quickly test every format under the sun.
Draft, as it is just an idea. I have not intersected drmdb enough to see if any of these formats actually matter, nor do I have any idea if the assumption actually holds.