1692f60a7Smrg/********************************************************************** 2692f60a7SmrgCopyright 1998, 1999 by Precision Insight, Inc., Cedar Park, Texas. 3692f60a7Smrg 4692f60a7Smrg All Rights Reserved 5692f60a7Smrg 6692f60a7SmrgPermission to use, copy, modify, distribute, and sell this software and 7692f60a7Smrgits documentation for any purpose is hereby granted without fee, 8692f60a7Smrgprovided that the above copyright notice appear in all copies and that 9692f60a7Smrgboth that copyright notice and this permission notice appear in 10692f60a7Smrgsupporting documentation, and that the name of Precision Insight not be 11692f60a7Smrgused in advertising or publicity pertaining to distribution of the 12692f60a7Smrgsoftware without specific, written prior permission. Precision Insight 13692f60a7Smrgand its suppliers make no representations about the suitability of this 14692f60a7Smrgsoftware for any purpose. It is provided "as is" without express or 15692f60a7Smrgimplied warranty. 16692f60a7Smrg 17692f60a7SmrgPRECISION INSIGHT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 18692f60a7SmrgINCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 19692f60a7SmrgEVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY 20692f60a7SmrgSPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER 21692f60a7SmrgRESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF 22692f60a7SmrgCONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 23692f60a7SmrgCONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 24692f60a7Smrg**********************************************************************/ 25692f60a7Smrg 26692f60a7Smrg/* 27692f60a7Smrg * The original Precision Insight driver for 28692f60a7Smrg * XFree86 v.3.3 has been sponsored by Red Hat. 29692f60a7Smrg * 30692f60a7Smrg * Authors: 31692f60a7Smrg * Jens Owen (jens@tungstengraphics.com) 32692f60a7Smrg * Kevin E. Martin (kevin@precisioninsight.com) 33692f60a7Smrg * 34692f60a7Smrg * Port to Xfree86 v.4.0 35692f60a7Smrg * 1998, 1999 by Egbert Eich (Egbert.Eich@Physik.TU-Darmstadt.DE) 36692f60a7Smrg */ 37692f60a7Smrg 38692f60a7Smrg#define WAIT_FB_FIFO_EMPTY() { \ 39692f60a7Smrg while( INREG(NEOREG_BLTSTAT) & NEO_BS0_FIFO_PEND); \ 40692f60a7Smrg } 41692f60a7Smrg 42692f60a7Smrg#define WAIT_BLT_DONE() { \ 43692f60a7Smrg while( INREG(NEOREG_BLTSTAT) & NEO_BS0_BLT_BUSY); \ 44692f60a7Smrg } 45692f60a7Smrg 46692f60a7Smrg#define WAIT_ENGINE_IDLE() { \ 47692f60a7Smrg WAIT_BLT_DONE(); \ 48692f60a7Smrg } 49692f60a7Smrg 50692f60a7Smrg#ifdef NOT_DONE 51692f60a7Smrg#define WAIT_FIFO(n) { \ 52692f60a7Smrg while( NeoFifoCount < (n)) { \ 53692f60a7Smrg NeoFifoCount = (INREG(NEOREG_BLTSTAT) >> 8); \ 54692f60a7Smrg } \ 55692f60a7Smrg NeoFifoCount -= (n); \ 56692f60a7Smrg } 57692f60a7Smrg#else 58692f60a7Smrg#define WAIT_FIFO(n) { \ 59692f60a7Smrg WAIT_ENGINE_IDLE(); \ 60692f60a7Smrg } 61692f60a7Smrg#endif 62692f60a7Smrg 63