diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-09-23 16:38:26 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-09-23 16:53:18 +0200 |
commit | 4a1132a023eb48cf10522d84c5908d43b612c041 (patch) | |
tree | 7908dde92fed0bde1ae75e92fb7ea9bdaa68e710 /drivers | |
parent | drm/radeon: don't set default clocks for SI when DPM is disabled (diff) | |
download | linux-4a1132a023eb48cf10522d84c5908d43b612c041.tar.xz linux-4a1132a023eb48cf10522d84c5908d43b612c041.zip |
drm/radeon: disable tests/benchmarks if accel is disabled
The tests are only usable if the acceleration engines have
been successfully initialized.
Based on an initial patch from: Alex Ivanov <gnidorah@p0n4ik.tk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index e29faa73b574..841d0e09be3e 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -1320,13 +1320,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; } |