diff options
author | Christian König <christian.koenig@amd.com> | 2016-10-05 08:29:38 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-10-25 14:38:36 -0400 |
commit | e12f3d7a23c99617f72305a805ed827567a43a9c (patch) | |
tree | 826d4091007045c5dc405f4ca0138a965761a34d /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |
parent | 7bc6be825a2efb00cf8a194e1d0560c92d5a2f6c (diff) |
drm/amdgpu: move IB and frame size directly into the engine description
I should have suggested that on the initial patchset. This saves us a
few CPU cycles during CS and a bunch of loc.
Signed-off-by: Christian König <christian.koenig@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/amdgpu_ib.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 3c9a6da0966e..16308eb22e7f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |||
@@ -152,8 +152,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | |||
152 | return -EINVAL; | 152 | return -EINVAL; |
153 | } | 153 | } |
154 | 154 | ||
155 | alloc_size = amdgpu_ring_get_dma_frame_size(ring) + | 155 | alloc_size = ring->funcs->emit_frame_size + num_ibs * |
156 | num_ibs * amdgpu_ring_get_emit_ib_size(ring); | 156 | ring->funcs->emit_ib_size; |
157 | 157 | ||
158 | r = amdgpu_ring_alloc(ring, alloc_size); | 158 | r = amdgpu_ring_alloc(ring, alloc_size); |
159 | if (r) { | 159 | if (r) { |