aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-01-02 18:30:21 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-01-03 13:17:31 -0500
commit909d9eb67f1e4e39f2ea88e96bde03d560cde3eb (patch)
treef41d42f4d42623d79b1830a456bbc45b5f798353
parentcafa59b9011a7790be4ddd5979419259844a165d (diff)
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 <bp@alien8.de> Cc: Markus Trippelsdorf <markus@trippelsdorf.de> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Tested-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/radeon/r600.c4
1 files 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,
2636 2636
2637 for (i = 0; i < num_loops; i++) { 2637 for (i = 0; i < num_loops; i++) {
2638 cur_size_in_dw = size_in_dw; 2638 cur_size_in_dw = size_in_dw;
2639 if (cur_size_in_dw > 0xFFFF) 2639 if (cur_size_in_dw > 0xFFFE)
2640 cur_size_in_dw = 0xFFFF; 2640 cur_size_in_dw = 0xFFFE;
2641 size_in_dw -= cur_size_in_dw; 2641 size_in_dw -= cur_size_in_dw;
2642 radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_COPY, 0, 0, cur_size_in_dw)); 2642 radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_COPY, 0, 0, cur_size_in_dw));
2643 radeon_ring_write(ring, dst_offset & 0xfffffffc); 2643 radeon_ring_write(ring, dst_offset & 0xfffffffc);