Improve debugging

* Provide more information on connectors
* Provide more information on detected attributes
* Remove some no longer needed debug output
* Provide connector ID on display debug output
This commit is contained in:
Alexander von Gluck IV 2011-12-13 11:39:31 -06:00
parent adaf4b3db1
commit 83cd861648
2 changed files with 21 additions and 28 deletions

View File

@ -712,13 +712,6 @@ connector_probe_legacy()
// TODO: combine shared connectors // TODO: combine shared connectors
for (i = 0; i < maxDevice; i++) {
if (gConnector[i]->valid == true) {
TRACE("%s: connector #%" B_PRId32 " is %s\n", __func__, i,
get_connector_name(gConnector[i]->type));
}
}
if (connectorIndex == 0) { if (connectorIndex == 0) {
TRACE("%s: zero connectors found using legacy detection\n", __func__); TRACE("%s: zero connectors found using legacy detection\n", __func__);
return B_ERROR; return B_ERROR;
@ -889,11 +882,7 @@ connector_probe()
continue; continue;
} }
// Set up encoder on connector if valid // Set up found connector
TRACE("%s: Path #%" B_PRId32 ": Found encoder "
"%s\n", __func__, i,
get_encoder_name(encoderType));
gConnector[connectorIndex]->encoder.valid gConnector[connectorIndex]->encoder.valid
= true; = true;
gConnector[connectorIndex]->encoder.flags gConnector[connectorIndex]->encoder.flags
@ -962,11 +951,6 @@ connector_probe()
// TODO: aux chan transactions // TODO: aux chan transactions
// record connector information
TRACE("%s: Path #%" B_PRId32 ": Found %s (0x%" B_PRIX32 ")\n",
__func__, i, get_connector_name(connectorType),
connectorType);
gConnector[connectorIndex]->valid = true; gConnector[connectorIndex]->valid = true;
gConnector[connectorIndex]->flags = connectorFlags; gConnector[connectorIndex]->flags = connectorFlags;
gConnector[connectorIndex]->type = connectorType; gConnector[connectorIndex]->type = connectorType;
@ -1013,14 +997,23 @@ debug_connectors()
uint16 gpioID = gConnector[id]->gpioID; uint16 gpioID = gConnector[id]->gpioID;
ERROR("Connector #%" B_PRIu32 ")\n", id); ERROR("Connector #%" B_PRIu32 ")\n", id);
ERROR(" + connector: %s\n", get_connector_name(connectorType)); ERROR(" + connector: %s\n", get_connector_name(connectorType));
ERROR(" + encoder: %s\n", get_encoder_name(encoderType)); ERROR(" + gpio table id: %" B_PRIu16 "\n", gpioID);
ERROR(" + encoder id: %" B_PRIu16 " (%s)\n", encoderID, ERROR(" + gpio hw pin: 0x%" B_PRIX32 "\n",
encoder_name_lookup(encoderID)); gGPIOInfo[gpioID]->hw_line);
ERROR(" + gpio id: %" B_PRIu16 "\n", gpioID);
ERROR(" + gpio valid: %s\n", ERROR(" + gpio valid: %s\n",
gGPIOInfo[gpioID]->valid ? "true" : "false"); gGPIOInfo[gpioID]->valid ? "true" : "false");
ERROR(" + hw line: 0x%" B_PRIX32 "\n", ERROR(" + encoder: %s\n", get_encoder_name(encoderType));
gGPIOInfo[gpioID]->hw_line); ERROR(" - id: %" B_PRIu16 "\n", encoderID);
ERROR(" - type: %s\n",
encoder_name_lookup(encoderID));
ERROR(" - is external: %s\n",
gConnector[id]->encoder.isExternal ? "true" : "false");
ERROR(" - is HDMI: %s\n",
gConnector[id]->encoder.isHDMI ? "true" : "false");
ERROR(" - is TV: %s\n",
gConnector[id]->encoder.isTV ? "true" : "false");
ERROR(" - is DP bridge: %s\n",
gConnector[id]->encoder.isDPBridge ? "true" : "false");
} }
} }
ERROR("==========================================\n"); ERROR("==========================================\n");

View File

@ -315,9 +315,9 @@ debug_displays()
if (gDisplay[id]->active) { if (gDisplay[id]->active) {
uint32 connectorType = gConnector[connectorIndex]->type; uint32 connectorType = gConnector[connectorIndex]->type;
uint32 encoderType = gConnector[connectorIndex]->encoder.type; uint32 encoderType = gConnector[connectorIndex]->encoder.type;
ERROR(" + connector: %s\n", get_connector_name(connectorType)); ERROR(" + connector ID: %" B_PRIu32 "\n", connectorIndex);
ERROR(" + encoder: %s\n", get_encoder_name(encoderType)); ERROR(" + connector type: %s\n", get_connector_name(connectorType));
ERROR(" + encoder type: %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);
ERROR(" + limits: Horz Min/Max: %" B_PRIu32 "/%" B_PRIu32"\n", ERROR(" + limits: Horz Min/Max: %" B_PRIu32 "/%" B_PRIu32"\n",