diff options
author | Ian Romanick <idr@us.ibm.com> | 2005-07-25 23:14:50 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2005-07-25 23:14:50 +0000 |
commit | fdb59d2535d7d517a14f3d6489ba91f3dac3b99f (patch) | |
tree | 97355924269b0d5956094f7f73605665bf940f7f /src/mga_dri.c | |
parent | 6030e8206db010f65199cbf5d332d2b47cdb3580 (diff) |
PInS data on later cards (G200 and later) contains information about the
physical bus used for the card. This allows accurate detection of PCI
cards that use a PCI-to-PCI bridge with an AGP chip.
Correctly disable DRI on PCI cards used with pre-3.2 DRM. Previously the
test was performed based on PCI ID (see above for why this is wrong)
and was done *before* the DRM version was known.
Bug #3759: <https://bugs.freedesktop.org/show_bug.cgi?id=3759> Correctly
determine the PLL reference frequency from the PInS data. Previously
the wrong bit was tested. Blame the dumb programmer that used
cut-and-paste (that would be me).
Diffstat (limited to 'src/mga_dri.c')
-rw-r--r-- | src/mga_dri.c | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/src/mga_dri.c b/src/mga_dri.c index 25b8a8c..bcaf03e 100644 --- a/src/mga_dri.c +++ b/src/mga_dri.c @@ -592,6 +592,10 @@ static unsigned int mylog2( unsigned int n ) * \todo * The sizes used for the primary DMA buffer and the bin size and count for * the secondary DMA buffers should be configurable from the xorg.conf. + * + * \todo + * This routine should use \c mga_bios_values::host_interface to limit the + * AGP mode. It the card is PCI, \c MGARec::agpSize should be forced to 0. */ static Bool MGADRIBootstrapDMA(ScreenPtr pScreen) { @@ -977,22 +981,10 @@ Bool MGADRIScreenInit( ScreenPtr pScreen ) case PCI_CHIP_MGAG550: case PCI_CHIP_MGAG400: case PCI_CHIP_MGAG200: - break; case PCI_CHIP_MGAG200_PCI: - /* PCI cards are supported if the DRM version is at least 3.2 and the - * user has not explicitly disabled the new DMA init path (i.e., to - * support old version of the client-side driver that don't use the - * new features of the 3.2 DRM). - */ - if ( (pMGADRIServer->drm_version_minor >= 2) && !pMga->useOldDmaInit ) { - break; - } - /*FALLTHROUGH*/ + break; default: - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "[drm] Direct rendering only supported with G200/G400/G550 AGP. PCI cards\n" - "[drm] (G450 and G200) are only supported with DRM version 3.2 or higher and\n" - "[drm] a recent client-side driver.\n"); + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] Direct rendering only supported with G200/G400/G450/G550.\n"); return FALSE; } @@ -1218,6 +1210,23 @@ Bool MGADRIScreenInit( ScreenPtr pScreen ) } } + if ( (pMga->bios.host_interface == MGA_HOST_PCI) && + ((pMGADRIServer->drm_version_minor < 2) || pMga->useOldDmaInit) ) { + /* PCI cards are supported if the DRM version is at least 3.2 and the + * user has not explicitly disabled the new DMA init path (i.e., to + * support old version of the client-side driver that don't use the + * new features of the 3.2 DRM). + */ + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "[drm] Direct rendering on PCI cards requires DRM version 3.2 or higher\n" + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "[drm] and a recent client-side driver. Also make sure that 'OldDmaInit'\n" + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "[drm] is not selected in xorg.conf.'\n"); + return FALSE; + } + + if ( !MGADRIBootstrapDMA( pScreen ) ) { DRICloseScreen( pScreen ); return FALSE; |