uint*t -> u_int*t changes
[mesa.git] / src / mesa / drivers / dri / i810 / i810screen.c
index 8995ec0ba4c083947f49704bacc7d39e478c5bcc..27a2c7cba7f23596629cdff61d849ef665dbc2aa 100644 (file)
@@ -49,9 +49,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "i810tris.h"
 #include "i810ioctl.h"
 
-#ifndef _SOLO
 #include "GL/internal/dri_interface.h"
-#endif
 
 #ifdef USE_NEW_INTERFACE
 static PFNGLXCREATECONTEXTMODES create_context_modes = NULL;
@@ -66,11 +64,11 @@ static __GLcontextModes *fill_in_modes( __GLcontextModes *modes,
                                       unsigned num_db_modes,
                                       int visType )
 {
-    static const uint8_t bits[1][4] = {
+    static const u_int8_t bits[1][4] = {
        {          5,          6,          5,          0 }
     };
 
-    static const uint32_t masks[1][4] = {
+    static const u_int32_t masks[1][4] = {
        { 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }
     };
 
@@ -230,8 +228,6 @@ i810InitDriver(__DRIscreenPrivate *sPriv)
    i810ScreenPrivate *i810Screen;
    I810DRIPtr         gDRIPriv = (I810DRIPtr)sPriv->pDevPriv;
 
-   if ( ! driCheckDriDdxDrmVersions( sPriv, "i810", 4, 0, 1, 0, 1, 2 ) )
-     return GL_FALSE;
 
    /* Allocate the private area */
    i810Screen = (i810ScreenPrivate *)CALLOC(sizeof(i810ScreenPrivate));
@@ -362,12 +358,6 @@ i810DestroyBuffer(__DRIdrawablePrivate *driDrawPriv)
 }
 
 
-static GLboolean
-i810OpenCloseFullScreen(__DRIcontextPrivate *driContextPriv)
-{
-    return GL_TRUE;
-}
-
 static const struct __DriverAPIRec i810API = {
    .InitDriver      = i810InitDriver,
    .DestroyScreen   = i810DestroyScreen,
@@ -378,8 +368,6 @@ static const struct __DriverAPIRec i810API = {
    .SwapBuffers     = i810SwapBuffers,
    .MakeCurrent     = i810MakeCurrent,
    .UnbindContext   = i810UnbindContext,
-   .OpenFullScreen  = i810OpenCloseFullScreen,
-   .CloseFullScreen = i810OpenCloseFullScreen,
    .GetSwapInfo     = NULL,
    .GetMSC          = NULL,
    .WaitForMSC      = NULL,
@@ -393,7 +381,7 @@ static const struct __DriverAPIRec i810API = {
  * The __driCreateScreen name is the symbol that libGL.so fetches.
  * Return:  pointer to a __DRIscreenPrivate.
  */
-#ifndef _SOLO
+#if !defined(DRI_NEW_INTERFACE_ONLY)
 void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
                         int numConfigs, __GLXvisualConfig *config)
 {
@@ -401,15 +389,7 @@ void *__driCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
    psp = __driUtilCreateScreen(dpy, scrn, psc, numConfigs, config, &i810API);
    return (void *) psp;
 }
-#elif !defined(DRI_NEW_INTERFACE_ONLY)
-void *__driCreateScreen(struct DRIDriverRec *driver,
-                        struct DRIDriverContextRec *driverContext)
-{
-   __DRIscreenPrivate *psp;
-   psp = __driUtilCreateScreen(driver, driverContext, &i810API);
-   return (void *) psp;
-}
-#endif
+#endif /* !defined(DRI_NEW_INTERFACE_ONLY) */
 
 /**
  * This is the bootstrap function for the driver.  libGL supplies all of the
@@ -434,6 +414,16 @@ void * __driCreateNewScreen( __DRInativeDisplay *dpy, int scrn, __DRIscreen *psc
 
 {
    __DRIscreenPrivate *psp;
+   static const __DRIversion ddx_expected = { 1, 0, 0 };
+   static const __DRIversion dri_expected = { 4, 0, 0 };
+   static const __DRIversion drm_expected = { 1, 2, 0 };
+
+   if ( ! driCheckDriDdxDrmVersions2( "i810",
+                                     dri_version, & dri_expected,
+                                     ddx_version, & ddx_expected,
+                                     drm_version, & drm_expected ) ) {
+      return NULL;
+   }
 
    psp = __driUtilCreateNewScreen(dpy, scrn, psc, NULL,
                                  ddx_version, dri_version, drm_version,