Closed chewitt closed 5 months ago
4K VP9 media with 59.94 fractional refresh rate causes the screen to go blank (no sync) with 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 formula to use 1002 in calculations instead of 1001 results in 593406 and 4K 59.94 media plays correctly:
diff --git a/drivers/gpu/drm/meson/meson_vclk.c b/drivers/gpu/drm/meson/meson_vclk.c index 2a82119eb58e..3fc7d9cb9953 100644 --- a/drivers/gpu/drm/meson/meson_vclk.c +++ b/drivers/gpu/drm/meson/meson_vclk.c @@ -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 {
However 1001 is the correct value and essential for other fractional rates like 23.976.
Perhaps a precision or rounding error?
Resolved with https://patchwork.kernel.org/project/linux-amlogic/patch/20240109230704.4120561-1-christianshewitt@gmail.com/
Closing as merged and picked to stable/fixes upstream.
4K VP9 media with 59.94 fractional refresh rate causes the screen to go blank (no sync) with the following error reported in system logs:
Modetest shows the following:
Tweaking DIV_ROUND_CLOSEST formula to use 1002 in calculations instead of 1001 results in 593406 and 4K 59.94 media plays correctly:
However 1001 is the correct value and essential for other fractional rates like 23.976.
Perhaps a precision or rounding error?