From 909d9eb67f1e4e39f2ea88e96bde03d560cde3eb Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Wed, 2 Jan 2013 18:30:21 -0500 Subject: [PATCH] drm/radeon/r6xx: fix DMA engine for ttm bo transfers count must be a multiple of 2. Fixes crashes on R6xx chips reported by a number of people. Cc: Borislav Petkov Cc: Markus Trippelsdorf Reviewed-by: Jerome Glisse Tested-by: Jerome Glisse Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/r600.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 2aaf147969bd..9f4ce5eb9e9c 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -2636,8 +2636,8 @@ int r600_copy_dma(struct radeon_device *rdev, for (i = 0; i < num_loops; i++) { cur_size_in_dw = size_in_dw; - if (cur_size_in_dw > 0xFFFF) - cur_size_in_dw = 0xFFFF; + if (cur_size_in_dw > 0xFFFE) + cur_size_in_dw = 0xFFFE; size_in_dw -= cur_size_in_dw; radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_COPY, 0, 0, cur_size_in_dw)); radeon_ring_write(ring, dst_offset & 0xfffffffc); -- 2.30.2