diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-07-18 15:24:37 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-07-22 21:57:11 +0200 |
commit | 745a39a9e6b2901cd341af01fc9bac78a9649e23 (patch) | |
tree | a7235cfc957605a1eb9dd3a909d3bc9df2bf8e57 /drivers/gpu | |
parent | Merge tag 'drm-intel-fixes-2013-07-22' of git://people.freedesktop.org/~danve... (diff) | |
download | linux-745a39a9e6b2901cd341af01fc9bac78a9649e23.tar.xz linux-745a39a9e6b2901cd341af01fc9bac78a9649e23.zip |
drm/radeon: wait for 3D idle before using CP DMA
Make sure the 3D engine is idle before using CP DMA for
bo copies.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Marek Olšák <maraeo@gmail.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 393880a09412..10f712e37003 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -3166,7 +3166,7 @@ int r600_copy_cpdma(struct radeon_device *rdev, size_in_bytes = (num_gpu_pages << RADEON_GPU_PAGE_SHIFT); num_loops = DIV_ROUND_UP(size_in_bytes, 0x1fffff); - r = radeon_ring_lock(rdev, ring, num_loops * 6 + 21); + r = radeon_ring_lock(rdev, ring, num_loops * 6 + 24); if (r) { DRM_ERROR("radeon: moving bo (%d).\n", r); radeon_semaphore_free(rdev, &sem, NULL); @@ -3181,6 +3181,9 @@ int r600_copy_cpdma(struct radeon_device *rdev, radeon_semaphore_free(rdev, &sem, NULL); } + radeon_ring_write(ring, PACKET3(PACKET3_SET_CONFIG_REG, 1)); + radeon_ring_write(ring, (WAIT_UNTIL - PACKET3_SET_CONFIG_REG_OFFSET) >> 2); + radeon_ring_write(ring, WAIT_3D_IDLE_bit); for (i = 0; i < num_loops; i++) { cur_size_in_bytes = size_in_bytes; if (cur_size_in_bytes > 0x1fffff) |