Commit 7c0d409d authored by Christian König's avatar Christian König Committed by Dave Airlie
Browse files

drm/radeon: immediately free ttm-move semaphore

We can now protected the semaphore ram by a
fence, so free it immediately.
Signed-off-by: default avatarChristian König <>
Signed-off-by: default avatarDave Airlie <>
parent c507f7ef
......@@ -223,6 +223,7 @@ static int radeon_move_blit(struct ttm_buffer_object *bo,
struct radeon_device *rdev;
uint64_t old_start, new_start;
struct radeon_fence *fence, *old_fence;
struct radeon_semaphore *sem = NULL;
int r;
rdev = radeon_get_rdev(bo->bdev);
......@@ -272,15 +273,16 @@ static int radeon_move_blit(struct ttm_buffer_object *bo,
bool sync_to_ring[RADEON_NUM_RINGS] = { };
sync_to_ring[old_fence->ring] = true;
r = radeon_semaphore_create(rdev, &fence->semaphore);
r = radeon_semaphore_create(rdev, &sem);
if (r) {
return r;
r = radeon_semaphore_sync_rings(rdev, fence->semaphore,
r = radeon_semaphore_sync_rings(rdev, sem,
sync_to_ring, fence->ring);
if (r) {
radeon_semaphore_free(rdev, sem, NULL);
return r;
......@@ -292,6 +294,7 @@ static int radeon_move_blit(struct ttm_buffer_object *bo,
/* FIXME: handle copy error */
r = ttm_bo_move_accel_cleanup(bo, (void *)fence, NULL,
evict, no_wait_reserve, no_wait_gpu, new_mem);
radeon_semaphore_free(rdev, sem, fence);
return r;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment