[PATCH 3/7] drm/amdgpu: print the selected benchmark test in the log
Alex Deucher
alexander.deucher at amd.com
Fri Feb 18 22:25:59 UTC 2022
So you can tell which benchmark was run.
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
index 7709f48e25a1..62422c395789 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
@@ -185,6 +185,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number)
switch (test_number) {
case 1:
+ dev_info(adev->dev, "benchmark test: %d\n", test_number);
/* simple test, VRAM to GTT and GTT to VRAM */
r = amdgpu_benchmark_move(adev, 1024*1024, AMDGPU_GEM_DOMAIN_GTT,
AMDGPU_GEM_DOMAIN_VRAM);
@@ -196,6 +197,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number)
return r;
break;
case 2:
+ dev_info(adev->dev, "benchmark test: %d\n", test_number);
/* simple test, VRAM to VRAM */
amdgpu_benchmark_move(adev, 1024*1024, AMDGPU_GEM_DOMAIN_VRAM,
AMDGPU_GEM_DOMAIN_VRAM);
@@ -203,6 +205,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number)
return r;
break;
case 3:
+ dev_info(adev->dev, "benchmark test: %d\n", test_number);
/* GTT to VRAM, buffer size sweep, powers of 2 */
for (i = 1; i <= 16384; i <<= 1) {
r = amdgpu_benchmark_move(adev, i * AMDGPU_GPU_PAGE_SIZE,
@@ -213,6 +216,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number)
}
break;
case 4:
+ dev_info(adev->dev, "benchmark test: %d\n", test_number);
/* VRAM to GTT, buffer size sweep, powers of 2 */
for (i = 1; i <= 16384; i <<= 1) {
r = amdgpu_benchmark_move(adev, i * AMDGPU_GPU_PAGE_SIZE,
@@ -223,6 +227,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number)
}
break;
case 5:
+ dev_info(adev->dev, "benchmark test: %d\n", test_number);
/* VRAM to VRAM, buffer size sweep, powers of 2 */
for (i = 1; i <= 16384; i <<= 1) {
r = amdgpu_benchmark_move(adev, i * AMDGPU_GPU_PAGE_SIZE,
@@ -233,6 +238,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number)
}
break;
case 6:
+ dev_info(adev->dev, "benchmark test: %d\n", test_number);
/* GTT to VRAM, buffer size sweep, common modes */
for (i = 0; i < AMDGPU_BENCHMARK_COMMON_MODES_N; i++) {
r = amdgpu_benchmark_move(adev, common_modes[i],
@@ -243,6 +249,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number)
}
break;
case 7:
+ dev_info(adev->dev, "benchmark test: %d\n", test_number);
/* VRAM to GTT, buffer size sweep, common modes */
for (i = 0; i < AMDGPU_BENCHMARK_COMMON_MODES_N; i++) {
r = amdgpu_benchmark_move(adev, common_modes[i],
@@ -253,6 +260,7 @@ int amdgpu_benchmark(struct amdgpu_device *adev, int test_number)
}
break;
case 8:
+ dev_info(adev->dev, "benchmark test: %d\n", test_number);
/* VRAM to VRAM, buffer size sweep, common modes */
for (i = 0; i < AMDGPU_BENCHMARK_COMMON_MODES_N; i++) {
r = amdgpu_benchmark_move(adev, common_modes[i],
--
2.35.1
More information about the amd-gfx
mailing list