diff options
author | Dave Airlie <airlied@redhat.com> | 2008-11-10 15:37:36 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-11-10 15:37:36 +1000 |
commit | 213a71f31b174dcae2ef5b3d8b124c1fb62d1866 (patch) | |
tree | 0a12125cecab841b28fe9c172ad8b0e8cf7ff29c | |
parent | 195cc0d817f99e25a1e961deeabbb15a40b789ed (diff) |
radeon: fix fence race condition hopefully
For some reason reading the SCRATCH reg from RAM causes some race to occur.
Hopefully fix this.
-rw-r--r-- | linux-core/radeon_fence.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/linux-core/radeon_fence.c b/linux-core/radeon_fence.c index b662da21..13af804b 100644 --- a/linux-core/radeon_fence.c +++ b/linux-core/radeon_fence.c @@ -57,14 +57,15 @@ static void radeon_fence_poll(struct drm_device *dev, uint32_t fence_class, { struct drm_radeon_private *dev_priv = (struct drm_radeon_private *) dev->dev_private; uint32_t sequence; - if (waiting_types & DRM_FENCE_TYPE_EXE) { - sequence = READ_BREADCRUMB(dev_priv); + sequence = RADEON_READ(RADEON_SCRATCH_REG3); + /* this used to be READ_BREADCRUMB(dev_priv); but it caused + * a race somewhere in the fencing irq + */ - DRM_DEBUG("polling %d\n", sequence); - drm_fence_handler(dev, 0, sequence, - DRM_FENCE_TYPE_EXE, 0); - } + DRM_DEBUG("polling %d\n", sequence); + drm_fence_handler(dev, 0, sequence, + DRM_FENCE_TYPE_EXE, 0); } void radeon_fence_handler(struct drm_device * dev) |