Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config/output: Pick among all 8-bit and 10-bit formats #8345

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kennylevinsen
Copy link
Member

The usual 8-bit and 10-bit formats have a lot of variations:

    XRGB, XBGR, RGBX, BGRX, ARGB, ABGR, RGBA, BGRA

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.

The usual 8-bit and 10-bit formats have a lot of variations:

        XRGB, XBGR, RGBX, BGRX, ARGB, ABGR, RGBA, BGRA

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant