Repository navigation
drm/connector: hdmi: Prefer YUV422 over dropping RGB to 8 bpc - #7682
Draft
popcornmix wants to merge 1 commit into
Draft
popcornmix wants to merge 1 commit into
popcornmix wants to merge 1 commit into
Conversation
When more than 8 bpc is requested and RGB only fits the TMDS limit at 8 bpc (e.g. 4k60 at 594MHz), YUV422 at 12 bpc fits at the same TMDS rate. Previously RGB was tried at every bpc before YUV422, so 8 bpc RGB was always chosen and the extra depth was lost. Try RGB down to 10 bpc, then YUV422, and only then RGB at 8 bpc. This keeps the existing preference for RGB at 10 bpc over YUV422 at 12 bpc. Signed-off-by: Dom Cobley <popcornmix@gmail.com>
6by9
approved these changes
Oct 14, 2026
6by9
left a comment
Contributor
There was a problem hiding this comment.
That should do what we want with as small a change to upstream code as possible.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When userspace requests more than 8 bpc (e.g. Kodi sets
max_bpc=12) and the mode only fits the TMDS limit with RGB at 8 bpc, the HDMI state helper picks 8-bit RGB. YUV422 at 12 bpc needs the same TMDS rate as RGB at 8 bpc, but it was never tried because RGB was tried at every bpc before YUV422.This changes the order to:
max_bpcdown to 10 bpcmax_bpcdown to 8 bpcWith
max_bpc=8the behaviour is unchanged. RGB at 10 bpc is still preferred over YUV422 at 12 bpc, matchingdrm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422.Tested on Pi 5 with Kodi playing a 4K 59.94 Hz 10-bit HDR clip on a TV that supports YCbCr 4:2:2:
The HDMI state helper KUnit tests give the same 8 failures before and after this change. They fail on rpi-6.18.y because
max_bpcnow starts at 8, so those tests never request more than 8 bpc.