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

vc4/hdmi: Ignore hotplug interrupt with force_hotplug #6123

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

popcornmix
Copy link
Collaborator

The intention of the vc4.force_hotplug setting is to ignore hotplug completely.

It can be used when a display switching AV inputs, or going into stanbdby or changing a KVM switch
toggles hotplug and some side effect of that is unwanted.

It turns out while vc4.force_hotplug currently makes hotplug always read as asserted, that isn't enough to stop drm doing lots of stuff, including re-reading the edid.

An example of what drm does with a hotplug deasert/assert and vc4.force_hotplug=1 currently is:

https://paste.debian.net/hidden/dc07434b/

That is unwanted. Lets ignore the hotplug interrupt completely so drm is blissfully unaware of the hotplug change.

@popcornmix
Copy link
Collaborator Author

Ping @6by9 @HiassofT

@6by9
Copy link
Contributor

6by9 commented Apr 23, 2024

Looks reasonable.

I was wondering whether it is better to not register the interrupt handler if force_hotplug was set, but I guess this way you can dynamically enable and disable force_hotplug via /sys/module/vc4/parameters/force_hotplug.

The intention of the vc4.force_hotplug setting is to
ignore hotplug completely.

It can be used when a display toggles hotplug when
switching AV inputs, going into standby or changing a
KVM switch, and some side effect of that is unwanted.

It turns out while vc4.force_hotplug currently makes
hotplug always read as asserted, that isn't enough to
stop drm doing lots of stuff, including re-reading
the edid.

An example of what drm does with a hotplug deasert/assert
and vc4.force_hotplug=1 currently is:

https://paste.debian.net/hidden/dc07434b/

That is unwanted. Lets ignore the hotplug interrupt
completely so drm is blissfully unaware of the hotplug change.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
@HiassofT
Copy link
Contributor

Thanks, a few quick tests on RPi5 and RPi4 look fine, no more log messages with drm.debug=0x07 when hotplug is de- and re-asserted.

@pelwell pelwell merged commit 8d40b03 into raspberrypi:rpi-6.6.y Apr 23, 2024
12 checks passed
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Apr 26, 2024
See: raspberrypi/linux#6113

kernel: DRM: rp1: rp1-dsi: Fix escape clock divider and timeouts
See: raspberrypi/linux#6120

kernel: vc4/hdmi: Ignore hotplug interrupt with force_hotplug
See: raspberrypi/linux#6123

kernel: drivers: media: cfe: Add remap entries for mono formats
See: raspberrypi/linux#6122

kernel: dw-axi-dmac-platform: Avoid trampling with zero length buffer
See: raspberrypi/linux#6118

kernel: Add a strict_gpiod option
See: raspberrypi/linux#6117

kernel: Unicam FS/FE timing GPIO
See: raspberrypi/linux#6088
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Apr 26, 2024
See: raspberrypi/linux#6113

kernel: DRM: rp1: rp1-dsi: Fix escape clock divider and timeouts
See: raspberrypi/linux#6120

kernel: vc4/hdmi: Ignore hotplug interrupt with force_hotplug
See: raspberrypi/linux#6123

kernel: drivers: media: cfe: Add remap entries for mono formats
See: raspberrypi/linux#6122

kernel: dw-axi-dmac-platform: Avoid trampling with zero length buffer
See: raspberrypi/linux#6118

kernel: Add a strict_gpiod option
See: raspberrypi/linux#6117

kernel: Unicam FS/FE timing GPIO
See: raspberrypi/linux#6088
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