diff options
Diffstat (limited to 'src/atimach64.c')
-rw-r--r-- | src/atimach64.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/atimach64.c b/src/atimach64.c index f90f6f91..dfbe8d76 100644 --- a/src/atimach64.c +++ b/src/atimach64.c @@ -20,6 +20,34 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ +/* + * Copyright 1999-2000 Precision Insight, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +/* + * DRI support by: + * Manuel Teira + * Leif Delgass <ldelgass@retinalburn.net> + */ #include "ati.h" #include "atibus.h" @@ -197,8 +225,20 @@ ATIMach64PreInit * When possible, max out command FIFO size. */ if (pATI->Chip >= ATI_CHIP_264VT4) + +#ifdef XF86DRI_DEVEL + + /* Changing the FIFO depth seems to interfere with DMA, so use + * default of 128 entries (0x01) + */ + pATIHW->gui_cntl = (inm(GUI_CNTL) & ~CMDFIFO_SIZE_MODE) | 0x01; + +#else /* XF86DRI_DEVEL */ + pATIHW->gui_cntl = inm(GUI_CNTL) & ~CMDFIFO_SIZE_MODE; +#endif /* XF86DRI_DEVEL */ + /* Initialise destination registers */ pATIHW->dst_off_pitch = SetBits((pATI->displayWidth * pATI->XModifier) >> 3, DST_PITCH); @@ -1083,6 +1123,13 @@ ATIMach64SetDPMSMode return; } +#ifdef XF86DRI_DEVEL + + /* XAA Sync requires the DRM lock if DRI enabled */ + ATIDRILock(pScreenInfo); + +#endif /* XF86DRI_DEVEL */ + ATIMach64Sync(pScreenInfo); outr(CRTC_GEN_CNTL, crtc_gen_cntl); @@ -1178,4 +1225,11 @@ ATIMach64SetDPMSMode } } } + +#ifdef XF86DRI_DEVEL + + ATIDRIUnlock(pScreenInfo); + +#endif /* XF86DRI_DEVEL */ + } |