From 1cc1f49825e7fc157f8cfecfb4c5168056f5f738 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 28 Jul 2005 01:44:17 +0000 Subject: Fix issues with buffer aging when more than one dma buffer is discarded in a cmdbuf, which could lead to hangs. Submitted by: Aapo Tahkola --- shared-core/r300_cmdbuf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/shared-core/r300_cmdbuf.c b/shared-core/r300_cmdbuf.c index af5b77f0..623f1f46 100644 --- a/shared-core/r300_cmdbuf.c +++ b/shared-core/r300_cmdbuf.c @@ -623,7 +623,7 @@ static void r300_discard_buffer(drm_device_t * dev, drm_buf_t * buf) drm_radeon_private_t *dev_priv = dev->dev_private; drm_radeon_buf_priv_t *buf_priv = buf->dev_private; - buf_priv->age = dev_priv->sarea_priv->last_dispatch+1; + buf_priv->age = ++dev_priv->sarea_priv->last_dispatch; buf->pending = 1; buf->used = 0; } @@ -788,8 +788,6 @@ cleanup: if (emit_dispatch_age) { RING_LOCALS; - dev_priv->sarea_priv->last_dispatch++; - /* Emit the vertex buffer age */ BEGIN_RING(2); RADEON_DISPATCH_AGE(dev_priv->sarea_priv->last_dispatch); -- cgit v1.2.3