summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGareth Hughes <gareth@users.sourceforge.net>2001-02-14 16:47:58 +0000
committerGareth Hughes <gareth@users.sourceforge.net>2001-02-14 16:47:58 +0000
commit495741e105e25940fcff18268401b21ce903c329 (patch)
tree91dd3d9b922d9716af7444bce828b2afe17d0c10
parenta39facbc3b9dcbcf6ff0a00802dd2829a95060f7 (diff)
Do that properly...
-rw-r--r--linux/mga_drv.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/linux/mga_drv.h b/linux/mga_drv.h
index fffcb89b..7a5a1dcc 100644
--- a/linux/mga_drv.h
+++ b/linux/mga_drv.h
@@ -306,9 +306,14 @@ do { \
#define AGE_BUFFER( buf_priv ) \
do { \
drm_mga_freelist_t *entry = (buf_priv)->list_entry; \
- entry->age.head = (dev_priv->prim.tail + \
- dev_priv->primary->offset); \
- entry->age.wrap = dev_priv->sarea_priv->last_wrap; \
+ if ( (buf_priv)->dispatched ) { \
+ entry->age.head = (dev_priv->prim.tail + \
+ dev_priv->primary->offset); \
+ entry->age.wrap = dev_priv->sarea_priv->last_wrap; \
+ } else { \
+ entry->age.head = 0; \
+ entry->age.wrap = 0; \
+ } \
} while (0)