summaryrefslogtreecommitdiffstats
path: root/pts-core/functions/pts-functions_system_graphics.php
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-08-09 22:45:03 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-08-09 22:45:03 -0400
commitce5aeecc23f072af281344f43df4cc172f70a3a8 (patch)
treea4396b6d4aa6ab0a788360d5114bdc7ac0c622ee /pts-core/functions/pts-functions_system_graphics.php
parenta4914fe556f05b3a0b569eb6a9076bb3bc1a6aad (diff)
downloadphoronix-test-suite-upstream-ce5aeecc23f072af281344f43df4cc172f70a3a8.tar.gz
phoronix-test-suite-upstream-ce5aeecc23f072af281344f43df4cc172f70a3a8.tar.xz
phoronix-test-suite-upstream-ce5aeecc23f072af281344f43df4cc172f70a3a8.zip
pts-core: Define DEFAULT_VIDEO_RAM_CAPACITY to 128MB for default video
RAM and switch statements that were hard-coded to 128 to using DEFAULT_VIDEO_RAM_CAPACITY
Diffstat (limited to 'pts-core/functions/pts-functions_system_graphics.php')
-rw-r--r--pts-core/functions/pts-functions_system_graphics.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/pts-core/functions/pts-functions_system_graphics.php b/pts-core/functions/pts-functions_system_graphics.php
index d624507..65bbd80 100644
--- a/pts-core/functions/pts-functions_system_graphics.php
+++ b/pts-core/functions/pts-functions_system_graphics.php
@@ -21,6 +21,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+define("DEFAULT_VIDEO_RAM_CAPACITY", 128);
+
function graphics_frequency_string()
{
if(IS_ATI_GRAPHICS)
@@ -517,7 +519,7 @@ function graphics_processor_string()
if(count($adapters) > 0)
{
- if($video_ram > 128)
+ if($video_ram > DEFAULT_VIDEO_RAM_CAPACITY)
$video_ram = " " . $video_ram . "MB";
else
$video_ram = "";
@@ -562,7 +564,7 @@ function graphics_processor_string()
$info = read_sysctl("dev.agp.0.%desc");
}
- if(IS_NVIDIA_GRAPHICS && $video_ram > 128 && strpos($info, $video_ram) == FALSE)
+ if(IS_NVIDIA_GRAPHICS && $video_ram > DEFAULT_VIDEO_RAM_CAPACITY && strpos($info, $video_ram) == FALSE)
{
$info .= " " . $video_ram . "MB";
}
@@ -598,9 +600,9 @@ function graphics_subsystem_version()
}
function graphics_memory_capacity()
{
- $video_ram = 128;
+ $video_ram = DEFAULT_VIDEO_RAM_CAPACITY;
- if(($vram = getenv("VIDEO_MEMORY")) != FALSE && is_numeric($vram) && $vram > 128)
+ if(($vram = getenv("VIDEO_MEMORY")) != FALSE && is_numeric($vram) && $vram > DEFAULT_VIDEO_RAM_CAPACITY)
{
$video_ram = $vram;
}
@@ -633,7 +635,7 @@ function graphics_memory_capacity()
}
if(IS_BSD)
- $video_ram = 128;
+ $video_ram = DEFAULT_VIDEO_RAM_CAPACITY;
return $video_ram;
}