aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-11-15 08:15:28 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-03-29 23:53:29 -0400
commit81522f71b1871a85bd32567904f414a42e8431af (patch)
tree246525bc0ebdba91bd9e5c3c22870d6464689a47 /drivers/gpu/drm/amd/amdgpu
parent35011d398e7543fbad086dad6d41b454a7c2e1e9 (diff)
drm/amdgpu: remove unused sync testing
Not used in a while. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c6
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_test.c79
3 files changed, 0 insertions, 89 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 4015fac77e99..f0e8b2ac84f4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1121,10 +1121,6 @@ void amdgpu_benchmark(struct amdgpu_device *adev, int test_number);
1121 * Testing 1121 * Testing
1122 */ 1122 */
1123void amdgpu_test_moves(struct amdgpu_device *adev); 1123void amdgpu_test_moves(struct amdgpu_device *adev);
1124void amdgpu_test_ring_sync(struct amdgpu_device *adev,
1125 struct amdgpu_ring *cpA,
1126 struct amdgpu_ring *cpB);
1127void amdgpu_test_syncing(struct amdgpu_device *adev);
1128 1124
1129/* 1125/*
1130 * MMU Notifier 1126 * MMU Notifier
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index e71a89c73684..ffaa703e89f5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1912,12 +1912,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
1912 else 1912 else
1913 DRM_INFO("amdgpu: acceleration disabled, skipping move tests\n"); 1913 DRM_INFO("amdgpu: acceleration disabled, skipping move tests\n");
1914 } 1914 }
1915 if ((amdgpu_testing & 2)) {
1916 if (adev->accel_working)
1917 amdgpu_test_syncing(adev);
1918 else
1919 DRM_INFO("amdgpu: acceleration disabled, skipping sync tests\n");
1920 }
1921 if (amdgpu_benchmarking) { 1915 if (amdgpu_benchmarking) {
1922 if (adev->accel_working) 1916 if (adev->accel_working)
1923 amdgpu_benchmark(adev, amdgpu_benchmarking); 1917 amdgpu_benchmark(adev, amdgpu_benchmarking);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
index b0483e6e536f..15510dadde01 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_test.c
@@ -237,82 +237,3 @@ void amdgpu_test_moves(struct amdgpu_device *adev)
237 if (adev->mman.buffer_funcs) 237 if (adev->mman.buffer_funcs)
238 amdgpu_do_test_moves(adev); 238 amdgpu_do_test_moves(adev);
239} 239}
240
241void amdgpu_test_ring_sync(struct amdgpu_device *adev,
242 struct amdgpu_ring *ringA,
243 struct amdgpu_ring *ringB)
244{
245}
246
247static void amdgpu_test_ring_sync2(struct amdgpu_device *adev,
248 struct amdgpu_ring *ringA,
249 struct amdgpu_ring *ringB,
250 struct amdgpu_ring *ringC)
251{
252}
253
254static bool amdgpu_test_sync_possible(struct amdgpu_ring *ringA,
255 struct amdgpu_ring *ringB)
256{
257 if (ringA == &ringA->adev->vce.ring[0] &&
258 ringB == &ringB->adev->vce.ring[1])
259 return false;
260
261 return true;
262}
263
264void amdgpu_test_syncing(struct amdgpu_device *adev)
265{
266 int i, j, k;
267
268 for (i = 1; i < AMDGPU_MAX_RINGS; ++i) {
269 struct amdgpu_ring *ringA = adev->rings[i];
270 if (!ringA || !ringA->ready)
271 continue;
272
273 for (j = 0; j < i; ++j) {
274 struct amdgpu_ring *ringB = adev->rings[j];
275 if (!ringB || !ringB->ready)
276 continue;
277
278 if (!amdgpu_test_sync_possible(ringA, ringB))
279 continue;
280
281 DRM_INFO("Testing syncing between rings %d and %d...\n", i, j);
282 amdgpu_test_ring_sync(adev, ringA, ringB);
283
284 DRM_INFO("Testing syncing between rings %d and %d...\n", j, i);
285 amdgpu_test_ring_sync(adev, ringB, ringA);
286
287 for (k = 0; k < j; ++k) {
288 struct amdgpu_ring *ringC = adev->rings[k];
289 if (!ringC || !ringC->ready)
290 continue;
291
292 if (!amdgpu_test_sync_possible(ringA, ringC))
293 continue;
294
295 if (!amdgpu_test_sync_possible(ringB, ringC))
296 continue;
297
298 DRM_INFO("Testing syncing between rings %d, %d and %d...\n", i, j, k);
299 amdgpu_test_ring_sync2(adev, ringA, ringB, ringC);
300
301 DRM_INFO("Testing syncing between rings %d, %d and %d...\n", i, k, j);
302 amdgpu_test_ring_sync2(adev, ringA, ringC, ringB);
303
304 DRM_INFO("Testing syncing between rings %d, %d and %d...\n", j, i, k);
305 amdgpu_test_ring_sync2(adev, ringB, ringA, ringC);
306
307 DRM_INFO("Testing syncing between rings %d, %d and %d...\n", j, k, i);
308 amdgpu_test_ring_sync2(adev, ringB, ringC, ringA);
309
310 DRM_INFO("Testing syncing between rings %d, %d and %d...\n", k, i, j);
311 amdgpu_test_ring_sync2(adev, ringC, ringA, ringB);
312
313 DRM_INFO("Testing syncing between rings %d, %d and %d...\n", k, j, i);
314 amdgpu_test_ring_sync2(adev, ringC, ringB, ringA);
315 }
316 }
317 }
318}