[PATCH] drm/amdgpu:fix write more dws to ring
Monk Liu
Monk.Liu at amd.com
Wed Jan 18 06:56:46 UTC 2017
Change-Id: I745512ed7d181e2cd0ce668c86ccfbb2dec80d4d
Signed-off-by: Monk Liu <Monk.Liu at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 9129b8c..6c24ed8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -125,7 +125,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
unsigned patch_offset = ~0;
struct amdgpu_vm *vm;
uint64_t fence_ctx;
- uint32_t status = 0, alloc_size;
+ uint32_t status = 0;
unsigned i;
int r = 0;
@@ -152,10 +152,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
return -EINVAL;
}
- alloc_size = ring->funcs->emit_frame_size + num_ibs *
- ring->funcs->emit_ib_size;
-
- r = amdgpu_ring_alloc(ring, alloc_size);
+ r = amdgpu_ring_alloc(ring, ring->funcs.align_mask + 1);
if (r) {
dev_err(adev->dev, "scheduling IB failed (%d).\n", r);
return r;
--
2.7.4
More information about the amd-gfx
mailing list