From c937ca1987565eae3496d16b3e8b1580c5f550a5 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 22 Feb 2012 06:52:51 -0600 Subject: [PATCH] radeon_hd: Improve pll DP bridge code * Only set DP bridge on DP bridge. * Add a bit of tracing --- src/add-ons/accelerants/radeon_hd/pll.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/add-ons/accelerants/radeon_hd/pll.cpp b/src/add-ons/accelerants/radeon_hd/pll.cpp index 075c0bad9a..b63efa12b6 100644 --- a/src/add-ons/accelerants/radeon_hd/pll.cpp +++ b/src/add-ons/accelerants/radeon_hd/pll.cpp @@ -50,6 +50,9 @@ pll_limit_probe(pll_info* pll) return B_ERROR; } + TRACE("%s: table %" B_PRIu8 ".%" B_PRIu8 "\n", __func__, + tableMajor, tableMinor); + union atomFirmwareInfo { ATOM_FIRMWARE_INFO info; ATOM_FIRMWARE_INFO_V1_2 info_12; @@ -342,14 +345,7 @@ pll_adjust(pll_info* pll, uint8 crtcID) uint32 encoderID = gConnector[connectorIndex]->encoder.objectID; uint32 encoderMode = display_get_encoder_mode(connectorIndex); uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags; - bool dpBridge = false; - - if ((encoderFlags & (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) - || gConnector[connectorIndex]->encoder.isDPBridge) { - TRACE("%s: external DP bridge detected!\n", __func__); - dpBridge = true; - } - + bool dpBridge = gConnector[connectorIndex]->encoder.isDPBridge; if (info.dceMajor >= 3) { @@ -362,6 +358,9 @@ pll_adjust(pll_info* pll, uint8 crtcID) return B_ERROR; } + TRACE("%s: table %" B_PRIu8 ".%" B_PRIu8 "\n", __func__, + tableMajor, tableMinor); + // Prepare arguments for AtomBIOS call union adjustPixelClock { ADJUST_DISPLAY_PLL_PS_ALLOCATION v1; @@ -500,6 +499,9 @@ pll_set(uint8 pllID, uint32 pixelClock, uint8 crtcID) int index = GetIndexIntoMasterTable(COMMAND, SetPixelClock); atom_parse_cmd_header(gAtomContext, index, &tableMajor, &tableMinor); + TRACE("%s: table %" B_PRIu8 ".%" B_PRIu8 "\n", __func__, + tableMajor, tableMinor); + uint32 bitsPerColor = 8; // TODO: Digital Depth, EDID 1.4+ on digital displays // isn't in Haiku edid common code?