Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4944

Graphics programming • Make HDMI clock adjustments using KMS/DRM

$
0
0
Hi. I want to revive an older question I had: On the Pi3 and before using the broadcom APIs it was possible to adjust the HDMI clock rate on the fly using "vcgencmd hdmi_adjust_clock". I've successfully used that to synchronize vsync across multiple Pis.

I've asked about how to implement this on the KMS/DRM stack in the past. Here 6by9 mentioned adjusting the vc4_hdmi->pixel_clock in vc4_hdmi.c. I looked at that again, but I don't see any obvious way to do that without modifying kernel code. But then I realized that I'm providing a clock rate to the kernel when modesetting: The drmModeModeInfo struct has a clock value and I could of course modify that.

So I tried that. But it turns out, even making slight frequency changes (like from 60Hz to 60.0004Hz) results in test displays turning black briefly. Maybe applying a new mode is a too heavy operation to not disrupt the output? Is there any other way this might be doable?

Statistics: Posted by dividuum — Sat Apr 20, 2024 9:01 pm — Replies 0 — Views 29



Viewing all articles
Browse latest Browse all 4944

Trending Articles