From 3028374488cc0f34942ac372c8d05cf15898a613 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 4 Nov 2009 18:48:03 -0500 Subject: ATOM/DCE3+: fix up usPixelClock calculation for Transmitter tables Signed-off-by: Alex Deucher --- src/atombios_output.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/atombios_output.c b/src/atombios_output.c index bf26c1b..4db5d0c 100644 --- a/src/atombios_output.c +++ b/src/atombios_output.c @@ -651,10 +651,10 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int action) cpu_to_le16(dp_link_clock_for_mode_clock(clock)); disp_data.v2.acConfig.fDPConnector = 1; } else if (clock > 165000) { - disp_data.v2.usPixelClock = cpu_to_le16((clock * 10 * 2) / 100); + disp_data.v2.usPixelClock = cpu_to_le16((clock / 2) / 10); disp_data.v2.acConfig.fDualLinkConnector = 1; } else { - disp_data.v2.usPixelClock = cpu_to_le16((clock * 10 * 4) / 100); + disp_data.v2.usPixelClock = cpu_to_le16(clock / 10); } if (dig_block) disp_data.v2.acConfig.ucEncoderSel = 1; @@ -687,8 +687,10 @@ atombios_output_dig_transmitter_setup(xf86OutputPtr output, int action) if (radeon_output->MonType == MT_DP) disp_data.v1.usPixelClock = cpu_to_le16(dp_link_clock_for_mode_clock(clock)); + else if (clock > 165000) + disp_data.v1.usPixelClock = cpu_to_le16((clock / 2) / 10); else - disp_data.v1.usPixelClock = cpu_to_le16((clock) / 10); + disp_data.v1.usPixelClock = cpu_to_le16(clock / 10); switch (radeon_encoder->encoder_id) { case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: -- cgit v1.2.3