diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-03 08:33:18 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-03 08:33:18 -0500 |
commit | df022b193d111b37dc8220d93d09c865ba205ee6 (patch) | |
tree | 13289eb177ed2b5e75ce1d0a55b9ce3ee0e544b8 /pts-core/functions/pts-functions_system_graphics.php | |
parent | 5cfbd53dd3f65a9055ab484b00fda5e2671b5eac (diff) | |
download | phoronix-test-suite-upstream-df022b193d111b37dc8220d93d09c865ba205ee6.tar.gz phoronix-test-suite-upstream-df022b193d111b37dc8220d93d09c865ba205ee6.tar.xz phoronix-test-suite-upstream-df022b193d111b37dc8220d93d09c865ba205ee6.zip |
pts-core: Add support for reading X.Org module / driver versions using
read_xorg_module_version()
pts-core: Where applicable, report X.Org DDX driver and version to
software information string
Diffstat (limited to 'pts-core/functions/pts-functions_system_graphics.php')
-rw-r--r-- | pts-core/functions/pts-functions_system_graphics.php | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_system_graphics.php b/pts-core/functions/pts-functions_system_graphics.php index 3399f22..61ee5f6 100644 --- a/pts-core/functions/pts-functions_system_graphics.php +++ b/pts-core/functions/pts-functions_system_graphics.php @@ -931,6 +931,81 @@ function opengl_version() return $info; } +function xorg_ddx_driver_info() +{ + $ddx_info = ""; + + if(IS_ATI_GRAPHICS) + { + $version = read_xorg_module_version("fglrx_drv.so"); + + if(!empty($version)) + { + $ddx_info = "fglrx " . $version; + } + } + else if(IS_MESA_GRAPHICS) + { + $gpu = graphics_processor_string(); + + if(strpos($gpu, "ATI")) + { + $version = read_xorg_module_version("radeon_drv.so"); + + if(!empty($version)) + { + $ddx_info = "xf86-video-radeon " . $version; + } + else + { + $version = read_xorg_module_version("radeonhd_drv.so"); + + if(!empty($version)) + { + $ddx_info = "xf86-video-radeonhd " . $version; + } + } + } + else if(strpos($gpu, "NVIDIA")) + { + $version = read_xorg_module_version("nv_drv.so"); + + if(!empty($version)) + { + $ddx_info = "xf86-video-nv " . $version; + } + else + { + $version = read_xorg_module_version("nouveau_drv.so"); + + if(!empty($version)) + { + $ddx_info = "xf86-video-nouveau " . $version; + } + } + } + else if(strpos($gpu, "Intel")) + { + $version = read_xorg_module_version("intel_drv.so"); + + if(!empty($version)) + { + $ddx_info = "xf86-video-intel " . $version; + } + } + else if(strpos($gpu, "VIA")) + { + $version = read_xorg_module_version("openchrome_drv.so"); + + if(!empty($version)) + { + $ddx_info = "xf86-video-openchrome " . $version; + } + } + } + + return $ddx_info; +} function graphics_gpu_usage() { // Determine GPU usage |