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

Commits on Sep 20, 2024

  1. config/output: Pick among all 8-bit and 10-bit formats

    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.
    kennylevinsen committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    72b5d55 View commit details
    Browse the repository at this point in the history