summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2014-01-24 05:28:51 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2014-01-24 05:28:51 +0000
commitbbcb6af376cbedc4976919510b04317a52886423 (patch)
tree49c9411d875ce4ce8cf242de35e18cfe937fdc75 /sys/dev/pci
parent77154f0d3697c72da0efcc704c15533e6dd1840d (diff)
drm/radeon: disable tests/benchmarks if accel is disabled
From Alex Deucher bce5a3c1bfa49fd373c28fc29bee89bf77fdc2db in ubuntu 3.8 4a1132a023eb48cf10522d84c5908d43b612c041 in mainline linux
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/drm/radeon/radeon_device.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_device.c b/sys/dev/pci/drm/radeon/radeon_device.c
index 02831b459f1..8404efeb538 100644
--- a/sys/dev/pci/drm/radeon/radeon_device.c
+++ b/sys/dev/pci/drm/radeon/radeon_device.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radeon_device.c,v 1.2 2013/10/18 12:34:52 deraadt Exp $ */
+/* $OpenBSD: radeon_device.c,v 1.3 2014/01/24 05:28:50 jsg Exp $ */
/*
* Copyright 2008 Advanced Micro Devices, Inc.
* Copyright 2008 Red Hat Inc.
@@ -1156,13 +1156,22 @@ int radeon_device_init(struct radeon_device *rdev,
return r;
}
if ((radeon_testing & 1)) {
- radeon_test_moves(rdev);
+ if (rdev->accel_working)
+ radeon_test_moves(rdev);
+ else
+ DRM_INFO("radeon: acceleration disabled, skipping move tests\n");
}
if ((radeon_testing & 2)) {
- radeon_test_syncing(rdev);
+ if (rdev->accel_working)
+ radeon_test_syncing(rdev);
+ else
+ DRM_INFO("radeon: acceleration disabled, skipping sync tests\n");
}
if (radeon_benchmarking) {
- radeon_benchmark(rdev, radeon_benchmarking);
+ if (rdev->accel_working)
+ radeon_benchmark(rdev, radeon_benchmarking);
+ else
+ DRM_INFO("radeon: acceleration disabled, skipping benchmarks\n");
}
return 0;
}