Skip to content

WIP: HDMI HPD debounce #5386

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

Open
wants to merge 2 commits into
base: rpi-6.1.y
Choose a base branch
from
Open

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Mar 17, 2023

Debounce the HPD signal for those people with dodgy cables.

WIP as the second patch pushes the delay up to 2.5secs. 250ms should be sufficient in most cases and not cause a noticeable delay.

6by9 added 2 commits March 17, 2023 13:54
With some cables it has been observed that the hot plug detect
line can bounce up and down, causing a storm of HPD events to
userspace.

Delay the message for hotplug assert so that userspace doesn't
get stressed.
Do not delay hotplug deassert as we must ensure that HPD going
low for 100ms is reported for times such as an A/V receiver
being turned on and needing to force an EDID reread. The HDMI
spec says this pulse is a minimum of 100ms.

Signed-off-by: Dave Stevenson <[email protected]>
@6by9
Copy link
Contributor Author

6by9 commented Mar 17, 2023

@spl237 Once the CI workflows have done their thing, you should be able to do sudo rpi-update pulls/5386 to update your system to a kernel with this patch.

drm_connector_helper_hpd_irq_event(connector);
}

#define HPD_DEBOUNCE_DELAY_MS 2500
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please dont put defines here instead place it near the top of the file

- #define HPD_DEBOUNCE_DELAY_MS 2500

You can put it near line 121

#define HSM_MIN_CLOCK_FREQ	120000000
#define CEC_CLOCK_FREQ 40000

#define HDMI_14_MAX_TMDS_CLK   (340 * 1000 * 1000)
+ #define HPD_DEBOUNCE_DELAY_MS 2500
/* bit field to force hotplug detection. bit0 = HDMI0 */
static int force_hotplug = 0;
module_param(force_hotplug, int, 0644);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who are you?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm only suggesting changes.

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.

3 participants