From f070c3c3114d1fdb52fba2c56c2475391d5fab12 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Thu, 8 Mar 2012 07:13:17 -0600 Subject: [PATCH] radeon_hd: Decode encoder flags in debug. * Should assist in troubleshooting. --- .../accelerants/radeon_hd/connector.cpp | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/src/add-ons/accelerants/radeon_hd/connector.cpp b/src/add-ons/accelerants/radeon_hd/connector.cpp index 3047eaac69..f01f5ac396 100644 --- a/src/add-ons/accelerants/radeon_hd/connector.cpp +++ b/src/add-ons/accelerants/radeon_hd/connector.cpp @@ -748,7 +748,9 @@ debug_connectors() uint32 connectorType = gConnector[id]->type; uint32 encoderType = gConnector[id]->encoder.type; uint16 encoderID = gConnector[id]->encoder.objectID; + uint32 encoderFlags = gConnector[id]->encoder.flags; uint16 gpioID = gConnector[id]->gpioID; + ERROR("Connector #%" B_PRIu32 ")\n", id); ERROR(" + connector: %s\n", get_connector_name(connectorType)); ERROR(" + gpio table id: %" B_PRIu16 "\n", gpioID); @@ -783,6 +785,59 @@ debug_connectors() } if (attribute == false) ERROR(" * no extra attributes\n"); + + bool flags = false; + ERROR(" - flags:\n"); + if ((encoderFlags & ATOM_DEVICE_CRT1_SUPPORT) != 0) { + ERROR(" * device CRT1 support\n"); + flags = true; + } + if ((encoderFlags & ATOM_DEVICE_CRT2_SUPPORT) != 0) { + ERROR(" * device CRT2 support\n"); + flags = true; + } + if ((encoderFlags & ATOM_DEVICE_LCD1_SUPPORT) != 0) { + ERROR(" * device LCD1 support\n"); + flags = true; + } + if ((encoderFlags & ATOM_DEVICE_LCD2_SUPPORT) != 0) { + ERROR(" * device LCD2 support\n"); + flags = true; + } + if ((encoderFlags & ATOM_DEVICE_TV1_SUPPORT) != 0) { + ERROR(" * device TV1 support\n"); + flags = true; + } + if ((encoderFlags & ATOM_DEVICE_CV_SUPPORT) != 0) { + ERROR(" * device CV support\n"); + flags = true; + } + if ((encoderFlags & ATOM_DEVICE_DFP1_SUPPORT) != 0) { + ERROR(" * device DFP1 support\n"); + flags = true; + } + if ((encoderFlags & ATOM_DEVICE_DFP2_SUPPORT) != 0) { + ERROR(" * device DFP2 support\n"); + flags = true; + } + if ((encoderFlags & ATOM_DEVICE_DFP3_SUPPORT) != 0) { + ERROR(" * device DFP3 support\n"); + flags = true; + } + if ((encoderFlags & ATOM_DEVICE_DFP4_SUPPORT) != 0) { + ERROR(" * device DFP4 support\n"); + flags = true; + } + if ((encoderFlags & ATOM_DEVICE_DFP5_SUPPORT) != 0) { + ERROR(" * device DFP5 support\n"); + flags = true; + } + if ((encoderFlags & ATOM_DEVICE_DFP6_SUPPORT) != 0) { + ERROR(" * device DFP6 support\n"); + flags = true; + } + if (flags == false) + ERROR(" * no known flags\n"); } } ERROR("==========================================\n");