From 6ac48cddd0a074c77de0ab3dfc1661352b6f0c26 Mon Sep 17 00:00:00 2001 From: Jeff Hartmann Date: Wed, 29 May 2002 21:21:50 +0000 Subject: Import Mesa 4.0 port of I830M/I845G 3D driver funded by 2d3d. Import Lastest i810 ddx driver changes from XFree86 CVS to support the I845G. Fixup warnings in I830M kernel driver. -Jeff --- linux-core/i830_dma.c | 6 ++---- linux/i830_dma.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/linux-core/i830_dma.c b/linux-core/i830_dma.c index e83ac5e9..b9c89aab 100644 --- a/linux-core/i830_dma.c +++ b/linux-core/i830_dma.c @@ -38,6 +38,7 @@ #include "i830_drm.h" #include "i830_drv.h" #include /* For task queue support */ +#include /* in case we don't have a 2.3.99-pre6 kernel or later: */ #ifndef VM_DONTCOPY @@ -58,7 +59,6 @@ do { \ int _head; \ int _tail; \ - int _i; \ do { \ _head = I830_READ(LP_RING + RING_HEAD) & HEAD_ADDR; \ _tail = I830_READ(LP_RING + RING_TAIL) & TAIL_ADDR; \ @@ -369,9 +369,7 @@ static int i830_wait_ring(drm_device_t *dev, int n) unsigned int last_head = I830_READ(LP_RING + RING_HEAD) & HEAD_ADDR; end = jiffies + (HZ*3); - while (ring->space < n) { - int i; - + while (ring->space < n) { ring->head = I830_READ(LP_RING + RING_HEAD) & HEAD_ADDR; ring->space = ring->head - (ring->tail+8); if (ring->space < 0) ring->space += ring->Size; diff --git a/linux/i830_dma.c b/linux/i830_dma.c index e83ac5e9..b9c89aab 100644 --- a/linux/i830_dma.c +++ b/linux/i830_dma.c @@ -38,6 +38,7 @@ #include "i830_drm.h" #include "i830_drv.h" #include /* For task queue support */ +#include /* in case we don't have a 2.3.99-pre6 kernel or later: */ #ifndef VM_DONTCOPY @@ -58,7 +59,6 @@ do { \ int _head; \ int _tail; \ - int _i; \ do { \ _head = I830_READ(LP_RING + RING_HEAD) & HEAD_ADDR; \ _tail = I830_READ(LP_RING + RING_TAIL) & TAIL_ADDR; \ @@ -369,9 +369,7 @@ static int i830_wait_ring(drm_device_t *dev, int n) unsigned int last_head = I830_READ(LP_RING + RING_HEAD) & HEAD_ADDR; end = jiffies + (HZ*3); - while (ring->space < n) { - int i; - + while (ring->space < n) { ring->head = I830_READ(LP_RING + RING_HEAD) & HEAD_ADDR; ring->space = ring->head - (ring->tail+8); if (ring->space < 0) ring->space += ring->Size; -- cgit v1.2.3