drm/radeon/benchmark: make sure bo blit copy exists before using it
Subsystems (2)
PATCH 1/2 drm/radeon/benchmark: make sure bo blit copy exists before using it
From: Alex Deucher <[email protected]>
Fixes a segfault on asics without a blit callback.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=62239
--- drivers/gpu/drm/radeon/radeon_benchmark.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
drivers/gpu/drm/radeon/radeon_benchmark.c +9 -7
@@ -135,13 +135,15 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size, sdomain, ddomain, "dma"); } - time =radeon_benchmark_do_move (rdev, size, saddr, daddr, -RADEON_BENCHMARK_COPY_BLIT , n); -if (time <0 ) - goto out_cleanup; -if (time >0 ) -radeon_benchmark_log_results (n, size, time, - sdomain, ddomain,"blit" ); +if (rdev->asic->copy.blit) { + time =radeon_benchmark_do_move (rdev, size, saddr, daddr, +RADEON_BENCHMARK_COPY_BLIT , n); +if (time <0 ) + goto out_cleanup; +if (time >0 ) +radeon_benchmark_log_results (n, size, time, + sdomain, ddomain,"blit" ); + } out_cleanup:if (sobj) {
Signature · 1 line
1.7.7.5
PATCH 2/2 drm/radeon/benchmark: allow same domains for dma copy
From: Alex Deucher <[email protected]>
Remove old comment and allow benchmarking moves within the same memory domain for both dma and blit methods.
--- drivers/gpu/drm/radeon/radeon_benchmark.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)
drivers/gpu/drm/radeon/radeon_benchmark.c +1 -4
@@ -122,10 +122,7 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size, goto out_cleanup; } -/* r100 doesn't have dma engine so skip the test */ -/* also, VRAM-to-VRAM test doesn't make much sense for DMA */ -/* skip it as well if domains are the same */ -if ((rdev->asic->copy.dma) && (sdomain != ddomain)) { +if (rdev->asic->copy.dma) { time =radeon_benchmark_do_move (rdev, size, saddr, daddr,RADEON_BENCHMARK_COPY_DMA , n);if (time <0 )
Signature · 1 line
1.7.7.5
Quoted 9 lines · On Mit, 2013-03-13 at 12:38 -0400, [email protected] wrote:
From: Alex Deucher <[email protected]>
Fixes a segfault on asics without a blit callback.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=62239Signed-off-by Alex Deucher <[email protected]>
For the series:
Signature · 2 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer
Dear Alex,
Am Mittwoch, den 13.03.2013, 12:38 -0400 schrieb [email protected]:
Quoted 3 lines
From: Alex Deucher <[email protected]>
Fixes a segfault on asics without a blit callback.
so as a result this is not benchmarked for these ASICS, right?
Quoted 8 lines
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=62239Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/radeon_benchmark.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
[…]
Thanks,
Paul
Re: [PATCH 2/2] drm/radeon/benchmark: allow same domains for dma copy
In reply to [email protected]Dear Alex,
Am Mittwoch, den 13.03.2013, 12:38 -0400 schrieb [email protected]:
Quoted 15 lines
From: Alex Deucher <[email protected]>
Remove old comment and allow benchmarking moves within the same memory domain for both dma and blit methods.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/radeon_benchmark.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)drivers/gpu/drm/radeon/radeon_benchmark.c +0
-0
drivers/gpu/drm/radeon/radeon_benchmark.c static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size, · line 125
Quoted 8 lines
drivers/gpu/drm/radeon/radeon_benchmark.c +1
-4@@ -122,10 +122,7 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size, goto out_cleanup; } -/* r100 doesn't have dma engine so skip the test */ -/* also, VRAM-to-VRAM test doesn't make much sense for DMA */ -/* skip it as well if domains are the same */ -if ((rdev->asic->copy.dma) && (sdomain != ddomain)) { +if (rdev->asic->copy.dma) {
why is the comment not valid anymore? What changed?
drivers/gpu/drm/radeon/radeon_benchmark.c static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size, · line 128
Quoted 3 lines
drivers/gpu/drm/radeon/radeon_benchmark.c +0
-0time =radeon_benchmark_do_move (rdev, size, saddr, daddr,RADEON_BENCHMARK_COPY_DMA , n);if (time <0 )
Thanks,
Paul
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Paul Menzel
Dear Alex,
Am Mittwoch, den 13.03.2013, 12:38 -0400 schrieb [email protected]:
Quoted 3 lines
From: Alex Deucher <[email protected]>
Fixes a segfault on asics without a blit callback.
so as a result this is not benchmarked for these ASICS, right?
Yes. it's not benchmarked, but there nothing to benchmark if the callback doesn't exist :)
Alex
Re: [PATCH 2/2] drm/radeon/benchmark: allow same domains for dma copy
In reply to Paul MenzelQuoted 22 lines · Paul Menzel
Dear Alex,
Am Mittwoch, den 13.03.2013, 12:38 -0400 schrieb [email protected]:
Quoted 18 lines
From: Alex Deucher <[email protected]>
Remove old comment and allow benchmarking moves within the same memory domain for both dma and blit methods.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/radeon_benchmark.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)drivers/gpu/drm/radeon/radeon_benchmark.c +0
-0@@ -122,10 +122,7 @@ static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size, goto out_cleanup; }
Quoted 7 lines
drivers/gpu/drm/radeon/radeon_benchmark.c static void radeon_benchmark_move(struct radeon_device *rdev, unsigned size, · line 125
Quoted 5 lines
drivers/gpu/drm/radeon/radeon_benchmark.c +1
-4-/* r100 doesn't have dma engine so skip the test */ -/* also, VRAM-to-VRAM test doesn't make much sense for DMA */ -/* skip it as well if domains are the same */ -if ((rdev->asic->copy.dma) && (sdomain != ddomain)) { +if (rdev->asic->copy.dma) {why is the comment not valid anymore? What changed?
In my opinion it was never valid.
Alex