summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2013-06-21 00:52:19 +0200
committerDave Airlie <airlied@redhat.com>2013-06-21 00:52:19 +0200
commit9aa36876ddeb85dfb0bcf37be06bbdc62e954f16 (patch)
tree5162ac17fb8814935f81d4f90c700f1e708138f6 /drivers
parentMerge branch 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux in... (diff)
parentdrm/radeon: update lockup tracking when scheduling in empty ring (diff)
downloadlinux-9aa36876ddeb85dfb0bcf37be06bbdc62e954f16.tar.xz
linux-9aa36876ddeb85dfb0bcf37be06bbdc62e954f16.zip
Merge branch 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
One user visible fix to stop misreport GPU hangs and subsequent resets. * 'drm-fixes-3.10' of git://people.freedesktop.org/~agd5f/linux: drm/radeon: update lockup tracking when scheduling in empty ring
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ring.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c
index e17faa7cf732..82434018cbe8 100644
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -402,6 +402,13 @@ int radeon_ring_alloc(struct radeon_device *rdev, struct radeon_ring *ring, unsi
return -ENOMEM;
/* Align requested size with padding so unlock_commit can
* pad safely */
+ radeon_ring_free_size(rdev, ring);
+ if (ring->ring_free_dw == (ring->ring_size / 4)) {
+ /* This is an empty ring update lockup info to avoid
+ * false positive.
+ */
+ radeon_ring_lockup_update(ring);
+ }
ndw = (ndw + ring->align_mask) & ~ring->align_mask;
while (ndw > (ring->ring_free_dw - 1)) {
radeon_ring_free_size(rdev, ring);