diff options
author | Dave Airlie <airliedfreedesktop.org> | 2004-03-15 03:39:52 +0000 |
---|---|---|
committer | Dave Airlie <airliedfreedesktop.org> | 2004-03-15 03:39:52 +0000 |
commit | f4d07d41188a52ddc84beefe4ab56e8be50a9d3c (patch) | |
tree | 796a2f828985b6fb84ca2a2997e417efe57bd13b /src/mesa/drivers/dri/i810/i810screen.c | |
parent | 7d05e484783cc81d2f9d4ceb2b1e1252555ffef0 (diff) |
use utility function to check versions
Diffstat (limited to 'src/mesa/drivers/dri/i810/i810screen.c')
-rw-r--r-- | src/mesa/drivers/dri/i810/i810screen.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/i810/i810screen.c b/src/mesa/drivers/dri/i810/i810screen.c index 53f1251fa9d..369619dad63 100644 --- a/src/mesa/drivers/dri/i810/i810screen.c +++ b/src/mesa/drivers/dri/i810/i810screen.c @@ -38,6 +38,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "context.h" #include "matrix.h" #include "simple_list.h" +#include "utils.h" #include "i810screen.h" #include "i810_dri.h" @@ -88,27 +89,8 @@ i810InitDriver(__DRIscreenPrivate *sPriv) i810ScreenPrivate *i810Screen; I810DRIPtr gDRIPriv = (I810DRIPtr)sPriv->pDevPriv; - /* Check the DRI externsion version */ - if ( sPriv->driMajor != 4 || sPriv->driMinor < 0 ) { - __driUtilMessage( "i810 DRI driver expected DRI version 4.0.x " - "but got version %d.%d.%d", - sPriv->driMajor, sPriv->driMinor, sPriv->driPatch ); - return GL_FALSE; - } - - /* Check that the DDX driver version is compatible */ - if (sPriv->ddxMajor != 1 || - sPriv->ddxMinor < 0) { - __driUtilMessage("i810 DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch); - return GL_FALSE; - } - - /* Check that the DRM driver version is compatible */ - if (sPriv->drmMajor != 1 || - sPriv->drmMinor < 2) { - __driUtilMessage("i810 DRI driver expected DRM driver version 1.2.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch); - return GL_FALSE; - } + if ( ! driCheckDriDdxDrmVersions( sPriv, "i810", 4, 0, 1, 0, 1, 2 ) ) + return GL_FALSE; /* Allocate the private area */ i810Screen = (i810ScreenPrivate *)CALLOC(sizeof(i810ScreenPrivate)); |