From: jsg Date: Mon, 5 Sep 2022 14:18:34 +0000 (+0000) Subject: drm/amd/display: Fix pixel clock programming X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=66e557edcf3f61f3ec074db63282300cd3ef7c49;p=openbsd drm/amd/display: Fix pixel clock programming From Ilya Bakoulin 4df54c493e76f3cfa0bc8c54c5c43faa3b6e78d4 in linux 5.15.y/5.15.65 04fb918bf421b299feaee1006e82921d7d381f18 in mainline linux --- 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;