Skip to content

Commit

Permalink
WIP: drm/meson/meson_vclk: fix VIC alternate timings
Browse files Browse the repository at this point in the history
4K VP9 media with 59.94 fractional refresh rate refuses to play with
the screen going blank (no sync) and the following error reported in
system logs:

[   89.610280] Fatal Error, invalid HDMI vclk freq 593406

Modetest shows the following:

3840x2160 59.94 3840 4016 4104 4400 2160 2168 2178 2250 593407 flags: phsync, pvsync; type: driver
calculated value -----------------------------------------^

Tweaking DIV_ROUND_CLOSEST to use 1002 in calculations allows 593406
to match and 4K 59.94 media now plays correctly.

Unfortunately this is not a proper fix and it's not guaranteed to
work for everyone. It points and issue with clocks/precision somewhere.

Fixes: ff217bc ("drm/meson: Add support for VIC alternate timings")
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
  • Loading branch information
chewitt committed Sep 21, 2022
1 parent 2ce0399 commit 647e901
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/meson/meson_vclk.c
Expand Up @@ -110,7 +110,7 @@
#define HDMI_PLL_LOCK BIT(31)
#define HDMI_PLL_LOCK_G12A (3 << 30)

#define FREQ_1000_1001(_freq) DIV_ROUND_CLOSEST(_freq * 1000, 1001)
#define FREQ_1000_1001(_freq) DIV_ROUND_CLOSEST(_freq * 1000, 1002)

/* VID PLL Dividers */
enum {
Expand Down

0 comments on commit 647e901

Please sign in to comment.