Commit fa8d387d authored by Alex Deucher's avatar Alex Deucher

drm/radeon/benchmark: make sure bo blit copy exists before using it

Fixes a segfault on asics without a blit callback.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=62239Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent 8f612b23
...@@ -135,13 +135,15 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size, ...@@ -135,13 +135,15 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size,
sdomain, ddomain, "dma"); sdomain, ddomain, "dma");
} }
time = radeon_benchmark_do_move(rdev, size, saddr, daddr, if (rdev->asic->copy.blit) {
RADEON_BENCHMARK_COPY_BLIT, n); time = radeon_benchmark_do_move(rdev, size, saddr, daddr,
if (time < 0) RADEON_BENCHMARK_COPY_BLIT, n);
goto out_cleanup; if (time < 0)
if (time > 0) goto out_cleanup;
radeon_benchmark_log_results(n, size, time, if (time > 0)
sdomain, ddomain, "blit"); radeon_benchmark_log_results(n, size, time,
sdomain, ddomain, "blit");
}
out_cleanup: out_cleanup:
if (sobj) { if (sobj) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment