From 5a1f9f0f16b2a4bef89b61b4e3e24bf0b53917da Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 14 Mar 2012 07:18:11 -0500 Subject: [PATCH] radeon_hd: Convert encoders to pointers * Preparation for multiple encoders per connector --- .../accelerants/radeon_hd/accelerant.h | 2 +- .../accelerants/radeon_hd/connector.cpp | 66 +++++++-------- src/add-ons/accelerants/radeon_hd/display.cpp | 8 +- .../accelerants/radeon_hd/displayport.cpp | 4 +- src/add-ons/accelerants/radeon_hd/encoder.cpp | 80 +++++++++---------- src/add-ons/accelerants/radeon_hd/pll.cpp | 16 ++-- 6 files changed, 89 insertions(+), 87 deletions(-) diff --git a/src/add-ons/accelerants/radeon_hd/accelerant.h b/src/add-ons/accelerants/radeon_hd/accelerant.h index b3bacb7479..aa1ff5686a 100644 --- a/src/add-ons/accelerants/radeon_hd/accelerant.h +++ b/src/add-ons/accelerants/radeon_hd/accelerant.h @@ -168,7 +168,7 @@ typedef struct { uint32 flags; uint32 lvdsFlags; uint16 gpioID; - struct encoder_info encoder; + encoder_info* encoder; // TODO struct radeon_hpd hpd; } connector_info; diff --git a/src/add-ons/accelerants/radeon_hd/connector.cpp b/src/add-ons/accelerants/radeon_hd/connector.cpp index 57e6b3811d..657e3a835d 100644 --- a/src/add-ons/accelerants/radeon_hd/connector.cpp +++ b/src/add-ons/accelerants/radeon_hd/connector.cpp @@ -439,18 +439,18 @@ connector_probe_legacy() uint32 encoderObject = encoder_object_lookup((1 << i), dac); uint32 encoderID = (encoderObject & OBJECT_ID_MASK) >> OBJECT_ID_SHIFT; + encoder_info* encoder = gConnector[connectorIndex]->encoder; + gConnector[connectorIndex]->valid = true; - gConnector[connectorIndex]->encoder.flags = (1 << i); - gConnector[connectorIndex]->encoder.valid = true; - gConnector[connectorIndex]->encoder.objectID = encoderID; - gConnector[connectorIndex]->encoder.type - = encoder_type_lookup(encoderID, (1 << i)); - gConnector[connectorIndex]->encoder.isExternal - = encoder_is_external(encoderID); + encoder->flags = (1 << i); + encoder->valid = true; + encoder->objectID = encoderID; + encoder->type = encoder_type_lookup(encoderID, (1 << i)); + encoder->isExternal = encoder_is_external(encoderID); connector_attach_gpio(connectorIndex, ci.sucI2cId.ucAccess); - pll_limit_probe(&gConnector[connectorIndex]->encoder.pll); + pll_limit_probe(&encoder->pll); connectorIndex++; } @@ -579,12 +579,14 @@ connector_probe() // = (B_LENDIAN_TO_HOST_INT16(path->usGraphicObjIds[j]) & // ENUM_ID_MASK) >> ENUM_ID_SHIFT; uint8 graphicObjectType - = (B_LENDIAN_TO_HOST_INT16(path->usGraphicObjIds[j]) & - OBJECT_TYPE_MASK) >> OBJECT_TYPE_SHIFT; + = (B_LENDIAN_TO_HOST_INT16(path->usGraphicObjIds[j]) + & OBJECT_TYPE_MASK) >> OBJECT_TYPE_SHIFT; if (graphicObjectType == GRAPH_OBJECT_TYPE_ENCODER) { // Found an encoder // TODO: it may be possible to have more then one encoder + encoder_info* encoder = connector->encoder; + int32 k; for (k = 0; k < encoderObject->ucNumberOfObjects; k++) { uint16 encoderObjectRaw @@ -629,20 +631,19 @@ connector_probe() continue; } - // Set up found connector - connector->encoder.valid = true; - connector->encoder.flags = connectorFlags; - connector->encoder.objectID = encoderID; - connector->encoder.type = encoderType; - connector->encoder.linkEnumeration + encoder->valid = true; + encoder->flags = connectorFlags; + encoder->objectID = encoderID; + encoder->type = encoderType; + encoder->linkEnumeration = (encoderObjectRaw & ENUM_ID_MASK) >> ENUM_ID_SHIFT; - connector->encoder.isExternal + encoder->isExternal = encoder_is_external(encoderID); - connector->encoder.isDPBridge + encoder->isDPBridge = encoder_is_dp_bridge(encoderID); - pll_limit_probe(&connector->encoder.pll); + pll_limit_probe(&encoder->pll); } } // END if object is encoder @@ -701,18 +702,18 @@ connector_probe() connector->type = connectorType; connector->objectID = connectorObjectID; - connector->encoder.isTV = false; - connector->encoder.isHDMI = false; + connector->encoder->isTV = false; + connector->encoder->isHDMI = false; switch (connectorType) { case VIDEO_CONNECTOR_COMPOSITE: case VIDEO_CONNECTOR_SVIDEO: case VIDEO_CONNECTOR_9DIN: - connector->encoder.isTV = true; + connector->encoder->isTV = true; break; case VIDEO_CONNECTOR_HDMIA: case VIDEO_CONNECTOR_HDMIB: - connector->encoder.isHDMI = true; + connector->encoder->isHDMI = true; break; } @@ -729,7 +730,7 @@ connector_is_dp(uint32 connectorIndex) { if (gConnector[connectorIndex]->type == VIDEO_CONNECTOR_DP || gConnector[connectorIndex]->type == VIDEO_CONNECTOR_EDP - || gConnector[connectorIndex]->encoder.isDPBridge == true) { + || gConnector[connectorIndex]->encoder->isDPBridge == true) { return true; } return false; @@ -743,9 +744,10 @@ debug_connectors() for (uint32 id = 0; id < ATOM_MAX_SUPPORTED_DEVICE; id++) { if (gConnector[id]->valid == true) { uint32 connectorType = gConnector[id]->type; - uint32 encoderType = gConnector[id]->encoder.type; - uint16 encoderID = gConnector[id]->encoder.objectID; - uint32 encoderFlags = gConnector[id]->encoder.flags; + encoder_info* encoder = gConnector[id]->encoder; + uint32 encoderType = encoder->type; + uint16 encoderID = encoder->objectID; + uint32 encoderFlags = encoder->flags; uint16 gpioID = gConnector[id]->gpioID; ERROR("Connector #%" B_PRIu32 ")\n", id); @@ -760,23 +762,23 @@ debug_connectors() ERROR(" - type: %s\n", encoder_name_lookup(encoderID)); ERROR(" - enumeration: %" B_PRIu32 "\n", - gConnector[id]->encoder.linkEnumeration); + encoder->linkEnumeration); bool attribute = false; ERROR(" - attributes:\n"); - if (gConnector[id]->encoder.isExternal == true) { + if (encoder->isExternal == true) { attribute = true; ERROR(" * is external\n"); } - if (gConnector[id]->encoder.isHDMI == true) { + if (encoder->isHDMI == true) { attribute = true; ERROR(" * is HDMI\n"); } - if (gConnector[id]->encoder.isTV == true) { + if (encoder->isTV == true) { attribute = true; ERROR(" * is TV\n"); } - if (gConnector[id]->encoder.isDPBridge == true) { + if (encoder->isDPBridge == true) { attribute = true; ERROR(" * is DisplayPort bridge\n"); } diff --git a/src/add-ons/accelerants/radeon_hd/display.cpp b/src/add-ons/accelerants/radeon_hd/display.cpp index c694b2e39e..fdca76605b 100644 --- a/src/add-ons/accelerants/radeon_hd/display.cpp +++ b/src/add-ons/accelerants/radeon_hd/display.cpp @@ -282,8 +282,8 @@ detect_displays() gDisplay[displayIndex]->attached = connector_read_edid(id, &gDisplay[displayIndex]->edid_info); - if (gConnector[id]->encoder.type == VIDEO_ENCODER_TVDAC - || gConnector[id]->encoder.type == VIDEO_ENCODER_DAC) { + if (gConnector[id]->encoder->type == VIDEO_ENCODER_TVDAC + || gConnector[id]->encoder->type == VIDEO_ENCODER_DAC) { // analog? with valid EDID? lets make sure there is load. // There is only one ddc communications path on DVI-I if (encoder_analog_load_detect(id) != true) { @@ -324,7 +324,7 @@ detect_displays() " Injecting first connector as a last resort.\n", __func__); for (uint32 id = 0; id < ATOM_MAX_SUPPORTED_DEVICE; id++) { // skip TV DAC connectors as likely fallback isn't for TV - if (gConnector[id]->encoder.type == VIDEO_ENCODER_TVDAC) + if (gConnector[id]->encoder->type == VIDEO_ENCODER_TVDAC) continue; gDisplay[0]->attached = true; gDisplay[0]->connectorIndex = id; @@ -357,7 +357,7 @@ debug_displays() if (gDisplay[id]->attached) { uint32 connectorType = gConnector[connectorIndex]->type; - uint32 encoderType = gConnector[connectorIndex]->encoder.type; + uint32 encoderType = gConnector[connectorIndex]->encoder->type; ERROR(" + connector ID: %" B_PRIu32 "\n", connectorIndex); ERROR(" + connector type: %s\n", get_connector_name(connectorType)); ERROR(" + encoder type: %s\n", get_encoder_name(encoderType)); diff --git a/src/add-ons/accelerants/radeon_hd/displayport.cpp b/src/add-ons/accelerants/radeon_hd/displayport.cpp index 19bd91481c..c9212bcefd 100644 --- a/src/add-ons/accelerants/radeon_hd/displayport.cpp +++ b/src/add-ons/accelerants/radeon_hd/displayport.cpp @@ -323,7 +323,7 @@ dp_aux_set_i2c_byte(uint32 hwPin, uint16 address, uint8* data, bool end) uint32 dp_get_link_clock(uint32 connectorIndex) { - uint16 encoderID = gConnector[connectorIndex]->encoder.objectID; + uint16 encoderID = gConnector[connectorIndex]->encoder->objectID; if (encoderID == ENCODER_OBJECT_ID_NUTMEG) return 270000; @@ -690,7 +690,7 @@ dp_link_train(uint8 crtcID, display_mode* mode) } uint32 linkEnumeration - = gConnector[connectorIndex]->encoder.linkEnumeration; + = gConnector[connectorIndex]->encoder->linkEnumeration; uint32 gpioID = gConnector[connectorIndex]->gpioID; uint32 hwPin = gGPIOInfo[gpioID]->hwPin; diff --git a/src/add-ons/accelerants/radeon_hd/encoder.cpp b/src/add-ons/accelerants/radeon_hd/encoder.cpp index 4ec09919cc..2a41077287 100644 --- a/src/add-ons/accelerants/radeon_hd/encoder.cpp +++ b/src/add-ons/accelerants/radeon_hd/encoder.cpp @@ -43,7 +43,7 @@ encoder_init() if (gConnector[id]->valid == false) continue; - switch (gConnector[id]->encoder.objectID) { + switch (gConnector[id]->encoder->objectID) { case ENCODER_OBJECT_ID_INTERNAL_UNIPHY: case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1: case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2: @@ -56,7 +56,7 @@ encoder_init() } if ((info.chipsetFlags & CHIP_APU) != 0 - && gConnector[id]->encoder.isExternal) { + && gConnector[id]->encoder->isExternal) { encoder_external_setup(id, 0, EXTERNAL_ENCODER_ACTION_V3_ENCODER_INIT); } @@ -79,8 +79,8 @@ encoder_assign_crtc(uint8 crtcID) return; uint16 connectorIndex = gDisplay[crtcID]->connectorIndex; - uint16 encoderID = gConnector[connectorIndex]->encoder.objectID; - uint16 encoderFlags = gConnector[connectorIndex]->encoder.flags; + uint16 encoderID = gConnector[connectorIndex]->encoder->objectID; + uint16 encoderFlags = gConnector[connectorIndex]->encoder->flags; // Prepare AtomBIOS command arguments union crtcSourceParam { @@ -215,7 +215,7 @@ encoder_pick_dig(uint32 connectorIndex) { TRACE("%s\n", __func__); radeon_shared_info &info = *gInfo->shared_info; - uint32 encoderID = gConnector[connectorIndex]->encoder.objectID; + uint32 encoderID = gConnector[connectorIndex]->encoder->objectID; // obtain assigned CRT uint32 crtcID; @@ -226,7 +226,7 @@ encoder_pick_dig(uint32 connectorIndex) break; } - bool linkB = gConnector[connectorIndex]->encoder.linkEnumeration + bool linkB = gConnector[connectorIndex]->encoder->linkEnumeration == GRAPH_OBJECT_ENUM_ID2 ? true : false; uint32 dceVersion = (info.dceMajor * 100) + info.dceMinor; @@ -268,7 +268,7 @@ encoder_apply_quirks(uint8 crtcID) radeon_shared_info &info = *gInfo->shared_info; register_info* regs = gDisplay[crtcID]->regs; uint32 connectorIndex = gDisplay[crtcID]->connectorIndex; - uint16 encoderFlags = gConnector[connectorIndex]->encoder.flags; + uint16 encoderFlags = gConnector[connectorIndex]->encoder->flags; // Setting the scaler clears this on some chips... if (info.dceMajor >= 3 @@ -286,9 +286,9 @@ encoder_mode_set(uint8 id, uint32 pixelClock) TRACE("%s\n", __func__); radeon_shared_info &info = *gInfo->shared_info; uint32 connectorIndex = gDisplay[id]->connectorIndex; - uint16 encoderFlags = gConnector[connectorIndex]->encoder.flags; + uint16 encoderFlags = gConnector[connectorIndex]->encoder->flags; - switch (gConnector[connectorIndex]->encoder.objectID) { + switch (gConnector[connectorIndex]->encoder->objectID) { case ENCODER_OBJECT_ID_INTERNAL_DAC1: case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1: case ENCODER_OBJECT_ID_INTERNAL_DAC2: @@ -352,7 +352,7 @@ encoder_mode_set(uint8 id, uint32 pixelClock) break; } - if (gConnector[connectorIndex]->encoder.isExternal == true) { + if (gConnector[connectorIndex]->encoder->isExternal == true) { if ((info.chipsetFlags & CHIP_APU) != 0) { // aka DCE 4.1 encoder_external_setup(connectorIndex, pixelClock, @@ -370,7 +370,7 @@ encoder_mode_set(uint8 id, uint32 pixelClock) status_t encoder_tv_setup(uint32 connectorIndex, uint32 pixelClock, int command) { - uint16 encoderFlags = gConnector[connectorIndex]->encoder.flags; + uint16 encoderFlags = gConnector[connectorIndex]->encoder->flags; TV_ENCODER_CONTROL_PS_ALLOCATION args; memset(&args, 0, sizeof(args)); @@ -398,9 +398,9 @@ encoder_digital_setup(uint32 connectorIndex, uint32 pixelClock, int command) TRACE("%s\n", __func__); int index = 0; - uint16 encoderFlags = gConnector[connectorIndex]->encoder.flags; + uint16 encoderFlags = gConnector[connectorIndex]->encoder->flags; - switch (gConnector[connectorIndex]->encoder.objectID) { + switch (gConnector[connectorIndex]->encoder->objectID) { case ENCODER_OBJECT_ID_INTERNAL_LVDS: index = GetIndexIntoMasterTable(COMMAND, LVDSEncoderControl); break; @@ -427,7 +427,7 @@ encoder_digital_setup(uint32 connectorIndex, uint32 pixelClock, int command) } uint32 lvdsFlags = gConnector[connectorIndex]->lvdsFlags; - bool isHdmi = gConnector[connectorIndex]->encoder.isHDMI; + bool isHdmi = gConnector[connectorIndex]->encoder->isHDMI; // Prepare AtomBIOS command arguments union lvdsEncoderControl { @@ -560,10 +560,10 @@ encoder_dig_setup(uint32 connectorIndex, uint32 pixelClock, int command) union digEncoderControl args; memset(&args, 0, sizeof(args)); - uint32 encoderID = gConnector[connectorIndex]->encoder.objectID; - bool isDPBridge = gConnector[connectorIndex]->encoder.isDPBridge; + uint32 encoderID = gConnector[connectorIndex]->encoder->objectID; + bool isDPBridge = gConnector[connectorIndex]->encoder->isDPBridge; - bool linkB = gConnector[connectorIndex]->encoder.linkEnumeration + bool linkB = gConnector[connectorIndex]->encoder->linkEnumeration == GRAPH_OBJECT_ENUM_ID2 ? true : false; // determine DP panel mode @@ -579,7 +579,7 @@ encoder_dig_setup(uint32 connectorIndex, uint32 pixelClock, int command) panelMode = DP_PANEL_MODE_EXTERNAL_DP_MODE; #if 0 - uint32 encoderID = gConnector[connectorIndex]->encoder.objectID; + uint32 encoderID = gConnector[connectorIndex]->encoder->objectID; if (gConnector[connectorIndex]->type == VIDEO_CONNECTOR_EDP) { uint8 temp = dpcd_read_reg(hwPin, DP_EDP_CONFIGURATION_CAP); if ((temp & 1) != 0) @@ -786,7 +786,7 @@ encoder_external_setup(uint32 connectorIndex, uint32 pixelClock, int command) } uint16 encoderFlags - = gConnector[connectorIndex]->encoder.flags; + = gConnector[connectorIndex]->encoder->flags; switch ((encoderFlags & ENUM_ID_MASK) >> ENUM_ID_SHIFT) { case GRAPH_OBJECT_ENUM_ID1: TRACE("%s: external encoder 1\n", __func__); @@ -859,13 +859,13 @@ encoder_analog_setup(uint32 connectorIndex, uint32 pixelClock, int command) { TRACE("%s\n", __func__); - uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags; + uint32 encoderFlags = gConnector[connectorIndex]->encoder->flags; int index = 0; DAC_ENCODER_CONTROL_PS_ALLOCATION args; memset(&args, 0, sizeof(args)); - switch (gConnector[connectorIndex]->encoder.objectID) { + switch (gConnector[connectorIndex]->encoder->objectID) { case ENCODER_OBJECT_ID_INTERNAL_DAC1: case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1: index = GetIndexIntoMasterTable(COMMAND, DAC1EncoderControl); @@ -904,7 +904,7 @@ encoder_analog_load_detect(uint32 connectorIndex) { TRACE("%s\n", __func__); - uint32 encoderID = gConnector[connectorIndex]->encoder.objectID; + uint32 encoderID = gConnector[connectorIndex]->encoder->objectID; if (encoder_is_external(encoderID)) return encoder_dig_load_detect(connectorIndex); @@ -918,8 +918,8 @@ encoder_dac_load_detect(uint32 connectorIndex) { TRACE("%s\n", __func__); - uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags; - uint32 encoderID = gConnector[connectorIndex]->encoder.objectID; + uint32 encoderFlags = gConnector[connectorIndex]->encoder->flags; + uint32 encoderID = gConnector[connectorIndex]->encoder->objectID; if ((encoderFlags & ATOM_DEVICE_TV_SUPPORT) == 0 && (encoderFlags & ATOM_DEVICE_CV_SUPPORT) == 0 @@ -1024,7 +1024,7 @@ encoder_dig_load_detect(uint32 connectorIndex) uint32 biosScratch0 = Read32(OUT, R600_BIOS_0_SCRATCH); - uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags; + uint32 encoderFlags = gConnector[connectorIndex]->encoder->flags; if ((encoderFlags & ATOM_DEVICE_CRT1_SUPPORT) != 0) if ((biosScratch0 & ATOM_S0_CRT1_MASK) != 0) @@ -1054,7 +1054,7 @@ transmitter_dig_setup(uint32 connectorIndex, uint32 pixelClock, { TRACE("%s\n", __func__); - uint16 encoderID = gConnector[connectorIndex]->encoder.objectID; + uint16 encoderID = gConnector[connectorIndex]->encoder->objectID; int index; switch (encoderID) { case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1: @@ -1105,13 +1105,13 @@ transmitter_dig_setup(uint32 connectorIndex, uint32 pixelClock, int connectorObjectID = (gConnector[connectorIndex]->objectID & OBJECT_ID_MASK) >> OBJECT_ID_SHIFT; - uint32 encoderObjectID = gConnector[connectorIndex]->encoder.objectID; + uint32 encoderObjectID = gConnector[connectorIndex]->encoder->objectID; uint32 digEncoderID = encoder_pick_dig(connectorIndex); - pll_info* pll = &gConnector[connectorIndex]->encoder.pll; + pll_info* pll = &gConnector[connectorIndex]->encoder->pll; bool isDP = connector_is_dp(connectorIndex); - bool linkB = gConnector[connectorIndex]->encoder.linkEnumeration + bool linkB = gConnector[connectorIndex]->encoder->linkEnumeration == GRAPH_OBJECT_ENUM_ID2 ? true : false; uint8 dpClock = 0; @@ -1191,7 +1191,7 @@ transmitter_dig_setup(uint32 connectorIndex, uint32 pixelClock, if (isDP) args.v1.ucConfig |= ATOM_TRANSMITTER_CONFIG_COHERENT; - else if ((gConnector[connectorIndex]->encoder.flags + else if ((gConnector[connectorIndex]->encoder->flags & ATOM_DEVICE_DFP_SUPPORT) != 0) { if (1) { // if coherentMode, i've only ever seen it true @@ -1244,7 +1244,7 @@ transmitter_dig_setup(uint32 connectorIndex, uint32 pixelClock, if (isDP) { args.v2.acConfig.fCoherentMode = 1; args.v2.acConfig.fDPConnector = 1; - } else if ((gConnector[connectorIndex]->encoder.flags + } else if ((gConnector[connectorIndex]->encoder->flags & ATOM_DEVICE_DFP_SUPPORT) != 0) { if (1) { // if coherentMode, i've only ever seen it true @@ -1311,7 +1311,7 @@ transmitter_dig_setup(uint32 connectorIndex, uint32 pixelClock, if (isDP) args.v3.acConfig.fCoherentMode = 1; - else if ((gConnector[connectorIndex]->encoder.flags + else if ((gConnector[connectorIndex]->encoder->flags & ATOM_DEVICE_DFP_SUPPORT) != 0) { if (1) { // if coherentMode, i've only ever seen it true @@ -1382,7 +1382,7 @@ transmitter_dig_setup(uint32 connectorIndex, uint32 pixelClock, if (isDP) args.v4.acConfig.fCoherentMode = 1; - else if ((gConnector[connectorIndex]->encoder.flags + else if ((gConnector[connectorIndex]->encoder->flags & ATOM_DEVICE_DFP_SUPPORT) != 0) { if (1) { // if coherentMode, i've only ever seen it true @@ -1410,7 +1410,7 @@ encoder_crtc_scratch(uint8 crtcID) TRACE("%s\n", __func__); uint32 connectorIndex = gDisplay[crtcID]->connectorIndex; - uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags; + uint32 encoderFlags = gConnector[connectorIndex]->encoder->flags; // TODO: r500 uint32 biosScratch3 = Read32(OUT, R600_BIOS_3_SCRATCH); @@ -1459,7 +1459,7 @@ encoder_dpms_scratch(uint8 crtcID, bool power) TRACE("%s\n", __func__); uint32 connectorIndex = gDisplay[crtcID]->connectorIndex; - uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags; + uint32 encoderFlags = gConnector[connectorIndex]->encoder->flags; // TODO: r500 uint32 biosScratch2 = Read32(OUT, R600_BIOS_2_SCRATCH); @@ -1540,8 +1540,8 @@ encoder_dpms_set(uint8 crtcID, int mode) memset(&args, 0, sizeof(args)); uint32 connectorIndex = gDisplay[crtcID]->connectorIndex; - uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags; - uint16 encoderID = gConnector[connectorIndex]->encoder.objectID; + uint32 encoderFlags = gConnector[connectorIndex]->encoder->flags; + uint16 encoderID = gConnector[connectorIndex]->encoder->objectID; switch (encoderID) { case ENCODER_OBJECT_ID_INTERNAL_TMDS1: @@ -1637,8 +1637,8 @@ encoder_dpms_set_dig(uint8 crtcID, int mode) radeon_shared_info &info = *gInfo->shared_info; uint32 connectorIndex = gDisplay[crtcID]->connectorIndex; - uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags; - pll_info* pll = &gConnector[connectorIndex]->encoder.pll; + uint32 encoderFlags = gConnector[connectorIndex]->encoder->flags; + pll_info* pll = &gConnector[connectorIndex]->encoder->pll; switch (mode) { case B_DPMS_ON: @@ -1713,7 +1713,7 @@ encoder_dpms_set_external(uint8 crtcID, int mode) radeon_shared_info &info = *gInfo->shared_info; uint32 connectorIndex = gDisplay[crtcID]->connectorIndex; - pll_info* pll = &gConnector[connectorIndex]->encoder.pll; + pll_info* pll = &gConnector[connectorIndex]->encoder->pll; switch (mode) { case B_DPMS_ON: diff --git a/src/add-ons/accelerants/radeon_hd/pll.cpp b/src/add-ons/accelerants/radeon_hd/pll.cpp index b63efa12b6..d529903bca 100644 --- a/src/add-ons/accelerants/radeon_hd/pll.cpp +++ b/src/add-ons/accelerants/radeon_hd/pll.cpp @@ -300,7 +300,7 @@ pll_setup_flags(pll_info* pll, uint8 crtcID) { radeon_shared_info &info = *gInfo->shared_info; uint32 connectorIndex = gDisplay[crtcID]->connectorIndex; - uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags; + uint32 encoderFlags = gConnector[connectorIndex]->encoder->flags; if ((info.dceMajor >= 3 && info.dceMinor >= 2) && pll->pixelClock > 200000) { @@ -342,10 +342,10 @@ pll_adjust(pll_info* pll, uint8 crtcID) // original as pixel_clock will be adjusted uint32 connectorIndex = gDisplay[crtcID]->connectorIndex; - uint32 encoderID = gConnector[connectorIndex]->encoder.objectID; + uint32 encoderID = gConnector[connectorIndex]->encoder->objectID; uint32 encoderMode = display_get_encoder_mode(connectorIndex); - uint32 encoderFlags = gConnector[connectorIndex]->encoder.flags; - bool dpBridge = gConnector[connectorIndex]->encoder.isDPBridge; + uint32 encoderFlags = gConnector[connectorIndex]->encoder->flags; + bool dpBridge = gConnector[connectorIndex]->encoder->isDPBridge; if (info.dceMajor >= 3) { @@ -481,7 +481,7 @@ status_t pll_set(uint8 pllID, uint32 pixelClock, uint8 crtcID) { uint32 connectorIndex = gDisplay[crtcID]->connectorIndex; - pll_info* pll = &gConnector[connectorIndex]->encoder.pll; + pll_info* pll = &gConnector[connectorIndex]->encoder->pll; pll->pixelClock = pixelClock; pll->id = pllID; @@ -553,7 +553,7 @@ pll_set(uint8 pllID, uint32 pixelClock, uint8 crtcID) // if (ss_enabled && (ss->type & ATOM_EXTERNAL_SS_MASK)) // args.v3.ucMiscInfo |= PIXEL_CLOCK_MISC_REF_DIV_SRC; args.v3.ucTransmitterId - = gConnector[connectorIndex]->encoder.objectID; + = gConnector[connectorIndex]->encoder->objectID; args.v3.ucEncoderMode = display_get_encoder_mode(connectorIndex); break; case 5: @@ -578,7 +578,7 @@ pll_set(uint8 pllID, uint32 pixelClock, uint8 crtcID) break; } args.v5.ucTransmitterID - = gConnector[connectorIndex]->encoder.objectID; + = gConnector[connectorIndex]->encoder->objectID; args.v5.ucEncoderMode = display_get_encoder_mode(connectorIndex); args.v5.ucPpll = pllID; @@ -610,7 +610,7 @@ pll_set(uint8 pllID, uint32 pixelClock, uint8 crtcID) break; } args.v6.ucTransmitterID - = gConnector[connectorIndex]->encoder.objectID; + = gConnector[connectorIndex]->encoder->objectID; args.v6.ucEncoderMode = display_get_encoder_mode(connectorIndex); args.v6.ucPpll = pllID; break;