Skip to content

drm/vc4: drop unnecessary and harmful HDMI RGB format check #5378

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

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

HiassofT
Copy link
Contributor

RGB is a mandatory format for all DVI and HDMI monitors so there's no need to check for presence of the DRM_COLOR_FORMAT_RGB444 bit in color_formats.

More importantly this checks breaks working around EDID issues with eg video=HDMI-A-1:1024x768D or drm.edid_firmware=edid/1024x768.bin as the RGB444 bit is only set when a valid EDID with digital bit set in the input byte is present - which isn't the case when no EDID can be read from the display device at all or with the in-built kernel EDIDs, which mimic analog (VGA) displays without the digital bit set.

So drop the check, if we output video on the HDMI connector we can assume that the display can accept 8bit RGB.

ping @mripard

Note: for a simple test power up RPi without HDMI cable attached, add eg video=HDMI-A-1:1024x768D drm.debug=0x04 to cmdline.txt and watch vc4 rejecting RGB mode in dmesg without this PR. With this PR the forced video mode is accepted and after attaching the cable to RPi3B+ I got a 1024x768 display just fine

@popcornmix
Copy link
Collaborator

This looks sane to me. @6by9 does this avoid your VGA/analogue issue?

@6by9
Copy link
Contributor

6by9 commented Mar 14, 2023

does this avoid your VGA/analogue issue?

It does, and this is effectively what we had under 5.15.
The question still remains whether drm_edid is doing the sensible thing, but this hides it.

RGB is a mandatory format for all DVI and HDMI monitors so there's
no need to check for presence of the DRM_COLOR_FORMAT_RGB444 bit in
color_formats.

More importantly this checks breaks working around EDID issues with
eg video=HDMI-A-1:1024x768D or drm.edid_firmware=edid/1024x768.bin
as the RGB444 bit is only set when a valid EDID with digital bit set in
the input byte is present - which isn't the case when no EDID can be
read from the display device at all or with the in-built kernel EDIDs,
which mimic analog (VGA) displays without the digital bit set.

So drop the check, if we output video on the HDMI connector we can
assume that the display can accept 8bit RGB.

Signed-off-by: Matthias Reichl <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants