From 66e557edcf3f61f3ec074db63282300cd3ef7c49 Mon Sep 17 00:00:00 2001 From: jsg Date: Mon, 5 Sep 2022 14:18:34 +0000 Subject: [PATCH] drm/amd/display: Fix pixel clock programming From Ilya Bakoulin 4df54c493e76f3cfa0bc8c54c5c43faa3b6e78d4 in linux 5.15.y/5.15.65 04fb918bf421b299feaee1006e82921d7d381f18 in mainline linux --- sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c b/sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c index 74f8bc75cc6..157d050a536 100644 --- a/sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c +++ b/sys/dev/pci/drm/amd/display/dc/dce/dce_clock_source.c @@ -545,9 +545,11 @@ static void dce112_get_pix_clk_dividers_helper ( switch (pix_clk_params->color_depth) { case COLOR_DEPTH_101010: actual_pixel_clock_100hz = (actual_pixel_clock_100hz * 5) >> 2; + actual_pixel_clock_100hz -= actual_pixel_clock_100hz % 10; break; case COLOR_DEPTH_121212: actual_pixel_clock_100hz = (actual_pixel_clock_100hz * 6) >> 2; + actual_pixel_clock_100hz -= actual_pixel_clock_100hz % 10; break; case COLOR_DEPTH_161616: actual_pixel_clock_100hz = actual_pixel_clock_100hz * 2; -- 2.20.1