diff options
author | Chunming Zhou <david1.zhou@amd.com> | 2015-08-25 05:23:45 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-26 17:50:42 -0400 |
commit | c7ae72c01be10f539f385f624713f8ba0aa11a8f (patch) | |
tree | c523633396afdeede8a47c386436bf0dd4e541ac /drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | |
parent | 113cd9dacbad4906e1c8db09233b9fdcb002f80d (diff) |
drm/amdgpu: use IB for copy buffer of eviction
This aids handling buffers moves with the scheduler.
Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c index 759482e4300d..98d59ee640ce 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | |||
@@ -33,7 +33,7 @@ static int amdgpu_benchmark_do_move(struct amdgpu_device *adev, unsigned size, | |||
33 | { | 33 | { |
34 | unsigned long start_jiffies; | 34 | unsigned long start_jiffies; |
35 | unsigned long end_jiffies; | 35 | unsigned long end_jiffies; |
36 | struct amdgpu_fence *fence = NULL; | 36 | struct fence *fence = NULL; |
37 | int i, r; | 37 | int i, r; |
38 | 38 | ||
39 | start_jiffies = jiffies; | 39 | start_jiffies = jiffies; |
@@ -42,17 +42,17 @@ static int amdgpu_benchmark_do_move(struct amdgpu_device *adev, unsigned size, | |||
42 | r = amdgpu_copy_buffer(ring, saddr, daddr, size, NULL, &fence); | 42 | r = amdgpu_copy_buffer(ring, saddr, daddr, size, NULL, &fence); |
43 | if (r) | 43 | if (r) |
44 | goto exit_do_move; | 44 | goto exit_do_move; |
45 | r = fence_wait(&fence->base, false); | 45 | r = fence_wait(fence, false); |
46 | if (r) | 46 | if (r) |
47 | goto exit_do_move; | 47 | goto exit_do_move; |
48 | amdgpu_fence_unref(&fence); | 48 | fence_put(fence); |
49 | } | 49 | } |
50 | end_jiffies = jiffies; | 50 | end_jiffies = jiffies; |
51 | r = jiffies_to_msecs(end_jiffies - start_jiffies); | 51 | r = jiffies_to_msecs(end_jiffies - start_jiffies); |
52 | 52 | ||
53 | exit_do_move: | 53 | exit_do_move: |
54 | if (fence) | 54 | if (fence) |
55 | amdgpu_fence_unref(&fence); | 55 | fence_put(fence); |
56 | return r; | 56 | return r; |
57 | } | 57 | } |
58 | 58 | ||