From 09e3cdb92c73a3c77a4f9f3b8f9c2d24be47fe89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 9 Sep 2012 11:45:19 +0200 Subject: [PATCH] drm/radeon: make 64bit fences more robust MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_fence.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_fence.c b/drivers/gpu/drm/radeon/radeon_fence.c index d24f5e4..999d1cf 100644 --- a/drivers/gpu/drm/radeon/radeon_fence.c +++ b/drivers/gpu/drm/radeon/radeon_fence.c @@ -160,7 +160,7 @@ void radeon_fence_process(struct radeon_device *rdev, int ring) do { seq = radeon_fence_read(rdev, ring); seq |= last_seq & 0xffffffff00000000LL; - if (seq < last_seq) { + if (seq < (last_seq - 0x80000000LL)) { seq += 0x100000000LL; } @@ -811,8 +811,8 @@ static void radeon_fence_driver_init_ring(struct radeon_device *rdev, int ring) rdev->fence_drv[ring].cpu_addr = NULL; rdev->fence_drv[ring].gpu_addr = 0; for (i = 0; i < RADEON_NUM_RINGS; ++i) - rdev->fence_drv[ring].sync_seq[i] = 0; - atomic64_set(&rdev->fence_drv[ring].last_seq, 0); + rdev->fence_drv[ring].sync_seq[i] = 0x100000000LL; + atomic64_set(&rdev->fence_drv[ring].last_seq, 0x100000000LL); rdev->fence_drv[ring].last_activity = jiffies; rdev->fence_drv[ring].initialized = false; } -- 1.7.9.5