diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-09 17:34:32 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-08-09 17:34:32 -0400 |
commit | 8e32927b6bb6f16a8349ead26ca143f999d0ea5f (patch) | |
tree | b916c71847a1ec6bd37b7faaadb84ac52a9508a3 /pts-core/functions/pts-functions_system_graphics.php | |
parent | deb39910c970f404f1d6b02192bd905fbbe74922 (diff) | |
download | phoronix-test-suite-upstream-8e32927b6bb6f16a8349ead26ca143f999d0ea5f.tar.gz phoronix-test-suite-upstream-8e32927b6bb6f16a8349ead26ca143f999d0ea5f.tar.xz phoronix-test-suite-upstream-8e32927b6bb6f16a8349ead26ca143f999d0ea5f.zip |
pts-core: Add ATI multi-GPU detection support
Diffstat (limited to 'pts-core/functions/pts-functions_system_graphics.php')
-rw-r--r-- | pts-core/functions/pts-functions_system_graphics.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_system_graphics.php b/pts-core/functions/pts-functions_system_graphics.php index dddc2f4..51377be 100644 --- a/pts-core/functions/pts-functions_system_graphics.php +++ b/pts-core/functions/pts-functions_system_graphics.php @@ -475,6 +475,36 @@ function graphics_processor_string() else $info = ""; + if(IS_ATI_GRAPHICS) + { + $crossfire_status = amd_pcsdb_parser("SYSTEM/Crossfire/chain/*,Enable"); + $crossfire_card_count = 0; + + if(!is_array($crossfire_status)) + $crossfire_status = array($crossfire_status); + + for($i = 0; $i < count($crossfire_status); $i++) + if($crossfire_status[$i] == "0x00000001") + $crossfire_card_count += 2; // For now assume each chain is 2 cards, but proper way would be NumSlaves + 1 + + $adapters = read_amd_graphics_adapters(); + + if(count($adapters) > 1) + { + if($crossfire_card_count > 1 && $crossfire_card_count <= count($adapters)) + { + $unique_adapters = array_unique($adapters); + + if(count($unique_adapters) == 1) + $info = $crossfire_card_count . " x " . $adapters[0] . " CrossFire"; + else + $info = implode(", ", $unique_adapters) . " CrossFire"; + } + else + $info = $adapters[0]; + } + } + if(empty($info) || strpos($info, "Mesa ") !== FALSE) { $info_pci = read_pci("VGA compatible controller:"); |