diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-01-04 09:24:18 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-01-04 09:29:54 -0500 |
commit | 43fb778754ffd1ef8b4f579a5c94f118292acfb5 (patch) | |
tree | 044dac1f191507b1348d558a2a805003c00a1414 /drivers/gpu/drm/radeon/r600.c | |
parent | eda85d6ad490923152544fba0473798b6cc0edf6 (diff) |
drm/radeon: split r6xx and r7xx copy_dma functions
- r6xx actually uses a slightly different packet format,
although both formats seem to work ok.
- r7xx doesn't have the count multiple of 2 limitation.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 923f93647042..537e259b3837 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -2646,7 +2646,7 @@ int r600_copy_blit(struct radeon_device *rdev, | |||
2646 | * @num_gpu_pages: number of GPU pages to xfer | 2646 | * @num_gpu_pages: number of GPU pages to xfer |
2647 | * @fence: radeon fence object | 2647 | * @fence: radeon fence object |
2648 | * | 2648 | * |
2649 | * Copy GPU paging using the DMA engine (r6xx-r7xx). | 2649 | * Copy GPU paging using the DMA engine (r6xx). |
2650 | * Used by the radeon ttm implementation to move pages if | 2650 | * Used by the radeon ttm implementation to move pages if |
2651 | * registered as the asic copy callback. | 2651 | * registered as the asic copy callback. |
2652 | */ | 2652 | */ |
@@ -2669,8 +2669,8 @@ int r600_copy_dma(struct radeon_device *rdev, | |||
2669 | } | 2669 | } |
2670 | 2670 | ||
2671 | size_in_dw = (num_gpu_pages << RADEON_GPU_PAGE_SHIFT) / 4; | 2671 | size_in_dw = (num_gpu_pages << RADEON_GPU_PAGE_SHIFT) / 4; |
2672 | num_loops = DIV_ROUND_UP(size_in_dw, 0xffff); | 2672 | num_loops = DIV_ROUND_UP(size_in_dw, 0xFFFE); |
2673 | r = radeon_ring_lock(rdev, ring, num_loops * 5 + 8); | 2673 | r = radeon_ring_lock(rdev, ring, num_loops * 4 + 8); |
2674 | if (r) { | 2674 | if (r) { |
2675 | DRM_ERROR("radeon: moving bo (%d).\n", r); | 2675 | DRM_ERROR("radeon: moving bo (%d).\n", r); |
2676 | radeon_semaphore_free(rdev, &sem, NULL); | 2676 | radeon_semaphore_free(rdev, &sem, NULL); |
@@ -2693,8 +2693,8 @@ int r600_copy_dma(struct radeon_device *rdev, | |||
2693 | radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_COPY, 0, 0, cur_size_in_dw)); | 2693 | radeon_ring_write(ring, DMA_PACKET(DMA_PACKET_COPY, 0, 0, cur_size_in_dw)); |
2694 | radeon_ring_write(ring, dst_offset & 0xfffffffc); | 2694 | radeon_ring_write(ring, dst_offset & 0xfffffffc); |
2695 | radeon_ring_write(ring, src_offset & 0xfffffffc); | 2695 | radeon_ring_write(ring, src_offset & 0xfffffffc); |
2696 | radeon_ring_write(ring, upper_32_bits(dst_offset) & 0xff); | 2696 | radeon_ring_write(ring, (((upper_32_bits(dst_offset) & 0xff) << 16) | |
2697 | radeon_ring_write(ring, upper_32_bits(src_offset) & 0xff); | 2697 | (upper_32_bits(src_offset) & 0xff))); |
2698 | src_offset += cur_size_in_dw * 4; | 2698 | src_offset += cur_size_in_dw * 4; |
2699 | dst_offset += cur_size_in_dw * 4; | 2699 | dst_offset += cur_size_in_dw * 4; |
2700 | } | 2700 | } |