projects / phoronix-test-suite.git / commitdiff
Build Results
 
Summary

Description: Phoronix Test Suite open-source benchmarking development
Last Change: Mon 12/15/14 13:00

Recent Commits
Time
Signed-Off By
Description
Commit Diff
Mon 12/15/14 13:00
Michael Larabel  
phoromatic: Move IP info... 
Mon 12/15/14 12:07
Michael Larabel  
phoromatic: Attempt to... 
Mon 12/15/14 11:45
Michael Larabel  
phoromatic: Add... 
Mon 12/15/14 11:26
Michael Larabel  
phoromatic: Improve... 
Tue 12/9/14 12:04
Michael Larabel  
pts-core: Add... 
Tue 12/9/14 11:20
Michael Larabel  
Phoronix Test Suite... 
 
> --git a/pts-core/functions/pts-functions_linux.php b/pts-core/functions/pts-functions_linux.php
index 17acf36
..31b014d 100644
--- a/pts-core/functions/pts-functions_linux.php
+++ b/pts-core/functions/pts-functions_linux.php
@@ -203,+203,@@ function graphics_subsystem_version()
 function 
graphics_memory_capacity()
 {
     
// Attempt NVIDIA (Binary Driver) Video RAM detection
-    $info shell_exec("nvidia-settings --query [gpu:0]/VideoRam");
+    
$info shell_exec("nvidia-settings --query [gpu:0]/VideoRam 2>&1");
     
$video_ram 128;

     if((
$pos strpos($info"VideoRam")) > 0)
@@ -
213,+213,18 @@ function graphics_memory_capacity()
         
$info trim(substr($info0strpos($info".")));
         
$video_ram intval($info) / 1024;
     }
-
-    
// Attempt ATI/AMD (Binary Driver) Video RAM detection
-    // TODO
+    else if(is_file("/var/log/Xorg.0.log"))
+    {
+        
// Attempt ATI (Binary Driver) Video RAM detection
+        $info shell_exec("cat /var/log/Xorg.0.log | grep VideoRAM");
+        
// fglrx driver reports video memory to: (--) fglrx(0): VideoRAM: XXXXXX kByte, Type: DDRX
+        if(($pos strpos($info"VideoRAM:")) > 0)
+        {
+            
$info substr($info$pos 10);
+            
$info substr($info0strpos($info' '));
+            
$video_ram intval($info) / 1024;
+        }
+    }

     return 
$video_ram;
 }
<
 
Phoronix.com
Linux Driver Forums
Copyright © 2014 by Phoronix Media