* style fixes
move quite a bit of code away from var_var format * #if 0 some not-yet-ready r500 code * no real functional change git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42835 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -133,22 +133,21 @@ typedef struct {
|
|||||||
|
|
||||||
struct encoder_info {
|
struct encoder_info {
|
||||||
bool valid;
|
bool valid;
|
||||||
|
uint16 objectID;
|
||||||
uint32 type;
|
uint32 type;
|
||||||
uint16 object_id;
|
|
||||||
uint32 flags;
|
uint32 flags;
|
||||||
bool is_hdmi;
|
bool isHDMI;
|
||||||
bool is_tv;
|
bool isTV;
|
||||||
struct pll_info pll;
|
struct pll_info pll;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool valid;
|
bool valid;
|
||||||
|
uint16 objectID;
|
||||||
uint32 type;
|
uint32 type;
|
||||||
uint16 object_id;
|
|
||||||
uint32 flags;
|
uint32 flags;
|
||||||
uint16 line_mux;
|
uint16 gpioID;
|
||||||
uint16 gpio_id;
|
|
||||||
struct encoder_info encoder;
|
struct encoder_info encoder;
|
||||||
// TODO struct radeon_hpd hpd;
|
// TODO struct radeon_hpd hpd;
|
||||||
} connector_info;
|
} connector_info;
|
||||||
|
|||||||
@@ -223,6 +223,8 @@ detect_crt_ranges(uint32 crtid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: only used on r4xx, r5xx, and rs600/rs690/rs740
|
||||||
|
#if 0
|
||||||
union atom_supported_devices {
|
union atom_supported_devices {
|
||||||
struct _ATOM_SUPPORTED_DEVICES_INFO info;
|
struct _ATOM_SUPPORTED_DEVICES_INFO info;
|
||||||
struct _ATOM_SUPPORTED_DEVICES_INFO_2 info_2;
|
struct _ATOM_SUPPORTED_DEVICES_INFO_2 info_2;
|
||||||
@@ -230,7 +232,6 @@ union atom_supported_devices {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// only used on r4xx, r5xx, and rs600/rs690/rs740
|
|
||||||
status_t
|
status_t
|
||||||
detect_connectors_legacy()
|
detect_connectors_legacy()
|
||||||
{
|
{
|
||||||
@@ -284,7 +285,7 @@ detect_connectors_legacy()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// uint8 dac = ci.sucConnectorInfo.sbfAccess.bfAssociatedDAC;
|
// uint8 dac = ci.sucConnectorInfo.sbfAccess.bfAssociatedDAC;
|
||||||
gConnector[i]->line_mux = ci.sucI2cId.ucAccess;
|
// gConnector[i]->line_mux = ci.sucI2cId.ucAccess;
|
||||||
|
|
||||||
// TODO : give tv unique connector ids
|
// TODO : give tv unique connector ids
|
||||||
|
|
||||||
@@ -320,6 +321,7 @@ detect_connectors_legacy()
|
|||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// r600+
|
// r600+
|
||||||
@@ -467,7 +469,7 @@ detect_connectors()
|
|||||||
uint32 encoderID = (encoder_obj & OBJECT_ID_MASK)
|
uint32 encoderID = (encoder_obj & OBJECT_ID_MASK)
|
||||||
>> OBJECT_ID_SHIFT;
|
>> OBJECT_ID_SHIFT;
|
||||||
|
|
||||||
uint32 encoder_type = VIDEO_ENCODER_NONE;
|
uint32 encoderType = VIDEO_ENCODER_NONE;
|
||||||
switch(encoderID) {
|
switch(encoderID) {
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_LVDS:
|
case ENCODER_OBJECT_ID_INTERNAL_LVDS:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_TMDS1:
|
case ENCODER_OBJECT_ID_INTERNAL_TMDS1:
|
||||||
@@ -475,20 +477,20 @@ detect_connectors()
|
|||||||
case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
|
case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
|
||||||
if ((connectorFlags
|
if ((connectorFlags
|
||||||
& ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
& ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
||||||
encoder_type = VIDEO_ENCODER_LVDS;
|
encoderType = VIDEO_ENCODER_LVDS;
|
||||||
// radeon_atombios_get_lvds_info
|
// radeon_atombios_get_lvds_info
|
||||||
} else {
|
} else {
|
||||||
encoder_type = VIDEO_ENCODER_TMDS;
|
encoderType = VIDEO_ENCODER_TMDS;
|
||||||
// radeon_atombios_set_dig_info
|
// radeon_atombios_set_dig_info
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DAC1:
|
case ENCODER_OBJECT_ID_INTERNAL_DAC1:
|
||||||
encoder_type = VIDEO_ENCODER_DAC;
|
encoderType = VIDEO_ENCODER_DAC;
|
||||||
break;
|
break;
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DAC2:
|
case ENCODER_OBJECT_ID_INTERNAL_DAC2:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
|
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
|
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2:
|
||||||
encoder_type = VIDEO_ENCODER_TVDAC;
|
encoderType = VIDEO_ENCODER_TVDAC;
|
||||||
break;
|
break;
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DVO1:
|
case ENCODER_OBJECT_ID_INTERNAL_DVO1:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
|
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1:
|
||||||
@@ -499,12 +501,12 @@ detect_connectors()
|
|||||||
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
|
case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
|
||||||
if ((connectorFlags
|
if ((connectorFlags
|
||||||
& ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
& ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
||||||
encoder_type = VIDEO_ENCODER_LVDS;
|
encoderType = VIDEO_ENCODER_LVDS;
|
||||||
} else if ((connectorFlags
|
} else if ((connectorFlags
|
||||||
& ATOM_DEVICE_CRT_SUPPORT) != 0) {
|
& ATOM_DEVICE_CRT_SUPPORT) != 0) {
|
||||||
encoder_type = VIDEO_ENCODER_DAC;
|
encoderType = VIDEO_ENCODER_DAC;
|
||||||
} else {
|
} else {
|
||||||
encoder_type = VIDEO_ENCODER_TMDS;
|
encoderType = VIDEO_ENCODER_TMDS;
|
||||||
}
|
}
|
||||||
// drm_encoder_helper_add
|
// drm_encoder_helper_add
|
||||||
break;
|
break;
|
||||||
@@ -519,18 +521,18 @@ detect_connectors()
|
|||||||
case ENCODER_OBJECT_ID_NUTMEG:
|
case ENCODER_OBJECT_ID_NUTMEG:
|
||||||
if ((connectorFlags
|
if ((connectorFlags
|
||||||
& ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
& ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
||||||
encoder_type = VIDEO_ENCODER_LVDS;
|
encoderType = VIDEO_ENCODER_LVDS;
|
||||||
} else if ((connectorFlags
|
} else if ((connectorFlags
|
||||||
& ATOM_DEVICE_CRT_SUPPORT) != 0) {
|
& ATOM_DEVICE_CRT_SUPPORT) != 0) {
|
||||||
encoder_type = VIDEO_ENCODER_DAC;
|
encoderType = VIDEO_ENCODER_DAC;
|
||||||
} else {
|
} else {
|
||||||
encoder_type = VIDEO_ENCODER_TMDS;
|
encoderType = VIDEO_ENCODER_TMDS;
|
||||||
}
|
}
|
||||||
// drm_encoder_helper_add
|
// drm_encoder_helper_add
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (encoder_type == VIDEO_ENCODER_NONE) {
|
if (encoderType == VIDEO_ENCODER_NONE) {
|
||||||
ERROR("%s: Path #%" B_PRId32 ":"
|
ERROR("%s: Path #%" B_PRId32 ":"
|
||||||
"skipping unknown encoder.\n",
|
"skipping unknown encoder.\n",
|
||||||
__func__, i);
|
__func__, i);
|
||||||
@@ -540,21 +542,21 @@ detect_connectors()
|
|||||||
// Set up encoder on connector if valid
|
// Set up encoder on connector if valid
|
||||||
TRACE("%s: Path #%" B_PRId32 ": Found encoder "
|
TRACE("%s: Path #%" B_PRId32 ": Found encoder "
|
||||||
"%s\n", __func__, i,
|
"%s\n", __func__, i,
|
||||||
get_encoder_name(encoder_type));
|
get_encoder_name(encoderType));
|
||||||
|
|
||||||
gConnector[connectorIndex]->encoder.flags
|
gConnector[connectorIndex]->encoder.flags
|
||||||
= connectorFlags;
|
= connectorFlags;
|
||||||
gConnector[connectorIndex]->encoder.valid
|
gConnector[connectorIndex]->encoder.valid
|
||||||
= true;
|
= true;
|
||||||
gConnector[connectorIndex]->encoder.object_id
|
gConnector[connectorIndex]->encoder.objectID
|
||||||
= encoderID;
|
= encoderID;
|
||||||
gConnector[connectorIndex]->encoder.type
|
gConnector[connectorIndex]->encoder.type
|
||||||
= encoder_type;
|
= encoderType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// END if object is encoder
|
// END if object is encoder
|
||||||
} else if (grph_obj_type == GRAPH_OBJECT_TYPE_ROUTER) {
|
} else if (grph_obj_type == GRAPH_OBJECT_TYPE_ROUTER) {
|
||||||
ERROR("%s: TODO : Found router object?\n", __func__);
|
ERROR("%s: TODO: Found router object?\n", __func__);
|
||||||
} // END if object is router
|
} // END if object is router
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -611,21 +613,20 @@ detect_connectors()
|
|||||||
gConnector[connectorIndex]->valid = true;
|
gConnector[connectorIndex]->valid = true;
|
||||||
gConnector[connectorIndex]->flags = connectorFlags;
|
gConnector[connectorIndex]->flags = connectorFlags;
|
||||||
gConnector[connectorIndex]->type = connectorType;
|
gConnector[connectorIndex]->type = connectorType;
|
||||||
gConnector[connectorIndex]->object_id
|
gConnector[connectorIndex]->objectID = connectorObjectID;
|
||||||
= connectorObjectID;
|
|
||||||
|
|
||||||
gConnector[connectorIndex]->encoder.is_tv = false;
|
gConnector[connectorIndex]->encoder.isTV = false;
|
||||||
gConnector[connectorIndex]->encoder.is_hdmi = false;
|
gConnector[connectorIndex]->encoder.isHDMI = false;
|
||||||
|
|
||||||
switch(connectorType) {
|
switch(connectorType) {
|
||||||
case VIDEO_CONNECTOR_COMPOSITE:
|
case VIDEO_CONNECTOR_COMPOSITE:
|
||||||
case VIDEO_CONNECTOR_SVIDEO:
|
case VIDEO_CONNECTOR_SVIDEO:
|
||||||
case VIDEO_CONNECTOR_9DIN:
|
case VIDEO_CONNECTOR_9DIN:
|
||||||
gConnector[connectorIndex]->encoder.is_tv = true;
|
gConnector[connectorIndex]->encoder.isTV = true;
|
||||||
break;
|
break;
|
||||||
case VIDEO_CONNECTOR_HDMIA:
|
case VIDEO_CONNECTOR_HDMIA:
|
||||||
case VIDEO_CONNECTOR_HDMIB:
|
case VIDEO_CONNECTOR_HDMIB:
|
||||||
gConnector[connectorIndex]->encoder.is_hdmi = true;
|
gConnector[connectorIndex]->encoder.isHDMI = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -651,7 +652,7 @@ detect_displays()
|
|||||||
if (gConnector[id]->valid == false)
|
if (gConnector[id]->valid == false)
|
||||||
continue;
|
continue;
|
||||||
// TODO : currently we skip TV connectors during detection
|
// TODO : currently we skip TV connectors during detection
|
||||||
if (gConnector[id]->encoder.is_tv == true)
|
if (gConnector[id]->encoder.isTV == true)
|
||||||
continue;
|
continue;
|
||||||
if (displayIndex >= MAX_DISPLAY)
|
if (displayIndex >= MAX_DISPLAY)
|
||||||
continue;
|
continue;
|
||||||
@@ -703,10 +704,10 @@ debug_displays()
|
|||||||
uint32 connectorIndex = gDisplay[id]->connectorIndex;
|
uint32 connectorIndex = gDisplay[id]->connectorIndex;
|
||||||
|
|
||||||
if (gDisplay[id]->active) {
|
if (gDisplay[id]->active) {
|
||||||
uint32 connector_type = gConnector[connectorIndex]->type;
|
uint32 connectorType = gConnector[connectorIndex]->type;
|
||||||
uint32 encoder_type = gConnector[connectorIndex]->encoder.type;
|
uint32 encoderType = gConnector[connectorIndex]->encoder.type;
|
||||||
ERROR(" + connector: %s\n", get_connector_name(connector_type));
|
ERROR(" + connector: %s\n", get_connector_name(connectorType));
|
||||||
ERROR(" + encoder: %s\n", get_encoder_name(encoder_type));
|
ERROR(" + encoder: %s\n", get_encoder_name(encoderType));
|
||||||
|
|
||||||
ERROR(" + limits: Vert Min/Max: %" B_PRIu32 "/%" B_PRIu32"\n",
|
ERROR(" + limits: Vert Min/Max: %" B_PRIu32 "/%" B_PRIu32"\n",
|
||||||
gDisplay[id]->vfreq_min, gDisplay[id]->vfreq_max);
|
gDisplay[id]->vfreq_min, gDisplay[id]->vfreq_max);
|
||||||
@@ -715,7 +716,6 @@ debug_displays()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
TRACE("==========================================\n");
|
TRACE("==========================================\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -725,17 +725,17 @@ debug_connectors()
|
|||||||
ERROR("Currently detected connectors=============\n");
|
ERROR("Currently detected connectors=============\n");
|
||||||
for (uint32 id = 0; id < ATOM_MAX_SUPPORTED_DEVICE; id++) {
|
for (uint32 id = 0; id < ATOM_MAX_SUPPORTED_DEVICE; id++) {
|
||||||
if (gConnector[id]->valid == true) {
|
if (gConnector[id]->valid == true) {
|
||||||
uint32 connector_type = gConnector[id]->type;
|
uint32 connectorType = gConnector[id]->type;
|
||||||
uint32 encoder_type = gConnector[id]->encoder.type;
|
uint32 encoderType = gConnector[id]->encoder.type;
|
||||||
uint16 gpio_id = gConnector[id]->gpio_id;
|
uint16 gpioID = gConnector[id]->gpioID;
|
||||||
ERROR("Connector #%" B_PRIu32 ")\n", id);
|
ERROR("Connector #%" B_PRIu32 ")\n", id);
|
||||||
ERROR(" + connector: %s\n", get_connector_name(connector_type));
|
ERROR(" + connector: %s\n", get_connector_name(connectorType));
|
||||||
ERROR(" + encoder: %s\n", get_encoder_name(encoder_type));
|
ERROR(" + encoder: %s\n", get_encoder_name(encoderType));
|
||||||
ERROR(" + gpio id: %" B_PRIu16 "\n", gpio_id);
|
ERROR(" + gpio id: %" B_PRIu16 "\n", gpioID);
|
||||||
ERROR(" + gpio valid: %s\n",
|
ERROR(" + gpio valid: %s\n",
|
||||||
gGPIOInfo[gpio_id]->valid ? "true" : "false");
|
gGPIOInfo[gpioID]->valid ? "true" : "false");
|
||||||
ERROR(" + hw line: 0x%" B_PRIX32 "\n",
|
ERROR(" + hw line: 0x%" B_PRIX32 "\n",
|
||||||
gGPIOInfo[gpio_id]->hw_line);
|
gGPIOInfo[gpioID]->hw_line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ERROR("==========================================\n");
|
ERROR("==========================================\n");
|
||||||
@@ -745,8 +745,7 @@ debug_connectors()
|
|||||||
uint32
|
uint32
|
||||||
display_get_encoder_mode(uint32 connectorIndex)
|
display_get_encoder_mode(uint32 connectorIndex)
|
||||||
{
|
{
|
||||||
uint32 connector_type = gConnector[connectorIndex]->type;
|
switch (gConnector[connectorIndex]->type) {
|
||||||
switch (connector_type) {
|
|
||||||
case VIDEO_CONNECTOR_DVII:
|
case VIDEO_CONNECTOR_DVII:
|
||||||
case VIDEO_CONNECTOR_HDMIB: /* HDMI-B is DL-DVI; analog works fine */
|
case VIDEO_CONNECTOR_HDMIB: /* HDMI-B is DL-DVI; analog works fine */
|
||||||
// TODO : if audio detected on edid and DCE4, ATOM_ENCODER_MODE_DVI
|
// TODO : if audio detected on edid and DCE4, ATOM_ENCODER_MODE_DVI
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ const int connector_convert[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
status_t init_registers(register_info* reg, uint8 crtid);
|
status_t init_registers(register_info* reg, uint8 crtid);
|
||||||
status_t detect_connectors_legacy();
|
// status_t detect_connectors_legacy();
|
||||||
status_t detect_connectors();
|
status_t detect_connectors();
|
||||||
status_t detect_crt_ranges(uint32 crtid);
|
status_t detect_crt_ranges(uint32 crtid);
|
||||||
status_t detect_displays();
|
status_t detect_displays();
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ encoder_assign_crtc(uint8 crtcID)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
uint16 connectorIndex = gDisplay[crtcID]->connectorIndex;
|
uint16 connectorIndex = gDisplay[crtcID]->connectorIndex;
|
||||||
uint16 encoderID = gConnector[connectorIndex]->encoder.object_id;
|
uint16 encoderID = gConnector[connectorIndex]->encoder.objectID;
|
||||||
|
|
||||||
switch (tableMajor) {
|
switch (tableMajor) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -181,7 +181,7 @@ encoder_mode_set(uint8 id, uint32 pixelClock)
|
|||||||
{
|
{
|
||||||
uint32 connectorIndex = gDisplay[id]->connectorIndex;
|
uint32 connectorIndex = gDisplay[id]->connectorIndex;
|
||||||
|
|
||||||
switch (gConnector[connectorIndex]->encoder.object_id) {
|
switch (gConnector[connectorIndex]->encoder.objectID) {
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DAC1:
|
case ENCODER_OBJECT_ID_INTERNAL_DAC1:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
|
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DAC2:
|
case ENCODER_OBJECT_ID_INTERNAL_DAC2:
|
||||||
@@ -229,9 +229,9 @@ encoder_digital_setup(uint8 id, uint32 pixelClock, int command)
|
|||||||
memset(&args, 0, sizeof(args));
|
memset(&args, 0, sizeof(args));
|
||||||
|
|
||||||
int index = 0;
|
int index = 0;
|
||||||
uint16 connector_flags = gConnector[connectorIndex]->encoder.flags;
|
uint16 encoderFlags = gConnector[connectorIndex]->encoder.flags;
|
||||||
|
|
||||||
switch (gConnector[connectorIndex]->encoder.object_id) {
|
switch (gConnector[connectorIndex]->encoder.objectID) {
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_LVDS:
|
case ENCODER_OBJECT_ID_INTERNAL_LVDS:
|
||||||
index = GetIndexIntoMasterTable(COMMAND, LVDSEncoderControl);
|
index = GetIndexIntoMasterTable(COMMAND, LVDSEncoderControl);
|
||||||
break;
|
break;
|
||||||
@@ -240,7 +240,7 @@ encoder_digital_setup(uint8 id, uint32 pixelClock, int command)
|
|||||||
index = GetIndexIntoMasterTable(COMMAND, TMDS1EncoderControl);
|
index = GetIndexIntoMasterTable(COMMAND, TMDS1EncoderControl);
|
||||||
break;
|
break;
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
|
case ENCODER_OBJECT_ID_INTERNAL_LVTM1:
|
||||||
if ((connector_flags & ATOM_DEVICE_LCD_SUPPORT) != 0)
|
if ((encoderFlags & ATOM_DEVICE_LCD_SUPPORT) != 0)
|
||||||
index = GetIndexIntoMasterTable(COMMAND, LVDSEncoderControl);
|
index = GetIndexIntoMasterTable(COMMAND, LVDSEncoderControl);
|
||||||
else
|
else
|
||||||
index = GetIndexIntoMasterTable(COMMAND, TMDS2EncoderControl);
|
index = GetIndexIntoMasterTable(COMMAND, TMDS2EncoderControl);
|
||||||
@@ -266,7 +266,7 @@ encoder_digital_setup(uint8 id, uint32 pixelClock, int command)
|
|||||||
args.v1.ucMisc |= PANEL_ENCODER_MISC_HDMI_TYPE;
|
args.v1.ucMisc |= PANEL_ENCODER_MISC_HDMI_TYPE;
|
||||||
args.v1.usPixelClock = B_HOST_TO_LENDIAN_INT16(pixelClock / 10);
|
args.v1.usPixelClock = B_HOST_TO_LENDIAN_INT16(pixelClock / 10);
|
||||||
|
|
||||||
if ((connector_flags & ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
if ((encoderFlags & ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
||||||
// TODO : laptop display support
|
// TODO : laptop display support
|
||||||
//if (dig->lcd_misc & ATOM_PANEL_MISC_DUAL)
|
//if (dig->lcd_misc & ATOM_PANEL_MISC_DUAL)
|
||||||
// args.v1.ucMisc |= PANEL_ENCODER_MISC_DUAL;
|
// args.v1.ucMisc |= PANEL_ENCODER_MISC_DUAL;
|
||||||
@@ -296,7 +296,7 @@ encoder_digital_setup(uint8 id, uint32 pixelClock, int command)
|
|||||||
args.v2.ucSpatial = 0;
|
args.v2.ucSpatial = 0;
|
||||||
args.v2.ucTemporal = 0;
|
args.v2.ucTemporal = 0;
|
||||||
args.v2.ucFRC = 0;
|
args.v2.ucFRC = 0;
|
||||||
if ((connector_flags & ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
if ((encoderFlags & ATOM_DEVICE_LCD_SUPPORT) != 0) {
|
||||||
// TODO : laptop display support
|
// TODO : laptop display support
|
||||||
//if (dig->lcd_misc & ATOM_PANEL_MISC_DUAL)
|
//if (dig->lcd_misc & ATOM_PANEL_MISC_DUAL)
|
||||||
// args.v2.ucMisc |= PANEL_ENCODER_MISC_DUAL;
|
// args.v2.ucMisc |= PANEL_ENCODER_MISC_DUAL;
|
||||||
@@ -351,7 +351,7 @@ encoder_analog_setup(uint8 id, uint32 pixelClock, int command)
|
|||||||
DAC_ENCODER_CONTROL_PS_ALLOCATION args;
|
DAC_ENCODER_CONTROL_PS_ALLOCATION args;
|
||||||
memset(&args, 0, sizeof(args));
|
memset(&args, 0, sizeof(args));
|
||||||
|
|
||||||
switch (gConnector[connectorIndex]->encoder.object_id) {
|
switch (gConnector[connectorIndex]->encoder.objectID) {
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_DAC1:
|
case ENCODER_OBJECT_ID_INTERNAL_DAC1:
|
||||||
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
|
case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1:
|
||||||
index = GetIndexIntoMasterTable(COMMAND, DAC1EncoderControl);
|
index = GetIndexIntoMasterTable(COMMAND, DAC1EncoderControl);
|
||||||
|
|||||||
@@ -371,14 +371,14 @@ bool
|
|||||||
radeon_gpu_read_edid(uint32 connector, edid1_info *edid)
|
radeon_gpu_read_edid(uint32 connector, edid1_info *edid)
|
||||||
{
|
{
|
||||||
// ensure things are sane
|
// ensure things are sane
|
||||||
uint32 gpio_id = gConnector[connector]->gpio_id;
|
uint32 gpioID = gConnector[connector]->gpioID;
|
||||||
if (gGPIOInfo[gpio_id]->valid == false)
|
if (gGPIOInfo[gpioID]->valid == false)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
i2c_bus bus;
|
i2c_bus bus;
|
||||||
|
|
||||||
ddc2_init_timing(&bus);
|
ddc2_init_timing(&bus);
|
||||||
bus.cookie = (void*)gGPIOInfo[gpio_id];
|
bus.cookie = (void*)gGPIOInfo[gpioID];
|
||||||
bus.set_signals = &set_i2c_signals;
|
bus.set_signals = &set_i2c_signals;
|
||||||
bus.get_signals = &get_i2c_signals;
|
bus.get_signals = &get_i2c_signals;
|
||||||
|
|
||||||
@@ -399,11 +399,11 @@ radeon_gpu_read_edid(uint32 connector, edid1_info *edid)
|
|||||||
status_t
|
status_t
|
||||||
radeon_gpu_i2c_attach(uint32 id, uint8 hw_line)
|
radeon_gpu_i2c_attach(uint32 id, uint8 hw_line)
|
||||||
{
|
{
|
||||||
gConnector[id]->gpio_id = 0;
|
gConnector[id]->gpioID = 0;
|
||||||
for (uint32 i = 0; i < ATOM_MAX_SUPPORTED_DEVICE; i++) {
|
for (uint32 i = 0; i < ATOM_MAX_SUPPORTED_DEVICE; i++) {
|
||||||
if (gGPIOInfo[i]->hw_line != hw_line)
|
if (gGPIOInfo[i]->hw_line != hw_line)
|
||||||
continue;
|
continue;
|
||||||
gConnector[id]->gpio_id = i;
|
gConnector[id]->gpioID = i;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ radeon_set_display_mode(display_mode *mode)
|
|||||||
|
|
||||||
// *** encoder prep
|
// *** encoder prep
|
||||||
encoder_output_lock(true);
|
encoder_output_lock(true);
|
||||||
encoder_dpms_set(id, gConnector[connectorIndex]->encoder.object_id,
|
encoder_dpms_set(id, gConnector[connectorIndex]->encoder.objectID,
|
||||||
B_DPMS_OFF);
|
B_DPMS_OFF);
|
||||||
encoder_assign_crtc(id);
|
encoder_assign_crtc(id);
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ radeon_set_display_mode(display_mode *mode)
|
|||||||
display_crtc_lock(id, ATOM_DISABLE);
|
display_crtc_lock(id, ATOM_DISABLE);
|
||||||
|
|
||||||
// *** encoder commit
|
// *** encoder commit
|
||||||
encoder_dpms_set(id, gConnector[connectorIndex]->encoder.object_id,
|
encoder_dpms_set(id, gConnector[connectorIndex]->encoder.objectID,
|
||||||
B_DPMS_ON);
|
B_DPMS_ON);
|
||||||
encoder_output_lock(false);
|
encoder_output_lock(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ pll_adjust(pll_info *pll, uint8 crtcID)
|
|||||||
uint32 adjustedClock = pll->pixel_clock;
|
uint32 adjustedClock = pll->pixel_clock;
|
||||||
|
|
||||||
uint32 connectorIndex = gDisplay[crtcID]->connectorIndex;
|
uint32 connectorIndex = gDisplay[crtcID]->connectorIndex;
|
||||||
uint32 encoderID = gConnector[connectorIndex]->encoder.object_id;
|
uint32 encoderID = gConnector[connectorIndex]->encoder.objectID;
|
||||||
uint32 encoder_mode = display_get_encoder_mode(connectorIndex);
|
uint32 encoder_mode = display_get_encoder_mode(connectorIndex);
|
||||||
|
|
||||||
if (info.device_chipset >= (RADEON_R600 | 0x20)) {
|
if (info.device_chipset >= (RADEON_R600 | 0x20)) {
|
||||||
@@ -325,7 +325,7 @@ pll_set(uint8 pllID, uint32 pixelClock, uint8 crtcID)
|
|||||||
// if (ss_enabled && (ss->type & ATOM_EXTERNAL_SS_MASK))
|
// if (ss_enabled && (ss->type & ATOM_EXTERNAL_SS_MASK))
|
||||||
// args.v3.ucMiscInfo |= PIXEL_CLOCK_MISC_REF_DIV_SRC;
|
// args.v3.ucMiscInfo |= PIXEL_CLOCK_MISC_REF_DIV_SRC;
|
||||||
args.v3.ucTransmitterId
|
args.v3.ucTransmitterId
|
||||||
= gConnector[connectorIndex]->encoder.object_id;
|
= gConnector[connectorIndex]->encoder.objectID;
|
||||||
args.v3.ucEncoderMode = display_get_encoder_mode(connectorIndex);
|
args.v3.ucEncoderMode = display_get_encoder_mode(connectorIndex);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
@@ -349,7 +349,7 @@ pll_set(uint8 pllID, uint32 pixelClock, uint8 crtcID)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
args.v5.ucTransmitterID
|
args.v5.ucTransmitterID
|
||||||
= gConnector[connectorIndex]->encoder.object_id;
|
= gConnector[connectorIndex]->encoder.objectID;
|
||||||
args.v5.ucEncoderMode
|
args.v5.ucEncoderMode
|
||||||
= display_get_encoder_mode(connectorIndex);
|
= display_get_encoder_mode(connectorIndex);
|
||||||
args.v5.ucPpll = pllID;
|
args.v5.ucPpll = pllID;
|
||||||
@@ -381,7 +381,7 @@ pll_set(uint8 pllID, uint32 pixelClock, uint8 crtcID)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
args.v6.ucTransmitterID
|
args.v6.ucTransmitterID
|
||||||
= gConnector[connectorIndex]->encoder.object_id;
|
= gConnector[connectorIndex]->encoder.objectID;
|
||||||
args.v6.ucEncoderMode = display_get_encoder_mode(connectorIndex);
|
args.v6.ucEncoderMode = display_get_encoder_mode(connectorIndex);
|
||||||
args.v6.ucPpll = pllID;
|
args.v6.ucPpll = pllID;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user