[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-glide: Changes to 'upstream-experimental'



 COPYING            |    4 
 configure.ac       |   14 ++-
 man/Makefile.am    |    2 
 src/Makefile.am    |    4 
 src/compat-api.h   |   94 ++++++++++++++++++++
 src/glide_driver.c |  247 +++++++++++++----------------------------------------
 6 files changed, 173 insertions(+), 192 deletions(-)

New commits:
commit 02d1981149c4feb27f2a662f14b94185bada0e33
Author: Guillem Jover <guillem@hadrons.org>
Date:   Tue Jul 17 15:17:01 2012 +0200

    Bump to 1.2.1
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/configure.ac b/configure.ac
index 594d711..cf5f896 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-glide],
-        [1.2.0],
+        [1.2.1],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-glide])
 

commit e705a91181ee0c9a838277b946bea68ffe8fffe6
Author: Guillem Jover <guillem@hadrons.org>
Date:   Wed Jun 6 16:08:16 2012 +0200

    Use new X server compat API
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/src/Makefile.am b/src/Makefile.am
index b8015dc..d7c63c9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -30,5 +30,6 @@ glide_drv_la_LDFLAGS = -module -avoid-version
 glide_drv_ladir = @moduledir@/drivers
 
 glide_drv_la_SOURCES = \
+         compat-api.h \
          glide_driver.c
 
diff --git a/src/compat-api.h b/src/compat-api.h
new file mode 100644
index 0000000..df783a8
--- /dev/null
+++ b/src/compat-api.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright 2012 Red Hat, Inc.
+ *
+ * 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 NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS 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.
+ *
+ * Author: Dave Airlie <airlied@redhat.com>
+ */
+
+/* this file provides API compat between server post 1.13 and pre it,
+   it should be reused inside as many drivers as possible */
+#ifndef COMPAT_API_H
+#define COMPAT_API_H
+
+#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
+#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
+#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
+#endif
+
+#ifndef XF86_HAS_SCRN_CONV
+#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
+#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
+#endif
+
+#ifndef XF86_SCRN_INTERFACE
+
+#define SCRN_ARG_TYPE int
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
+
+#define SCREEN_ARG_TYPE int
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
+
+#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv
+
+#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
+#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
+
+#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
+#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
+
+#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
+
+#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags
+
+#define FREE_SCREEN_ARGS_DECL int arg, int flags
+
+#define VT_FUNC_ARGS_DECL int arg, int flags
+#define VT_FUNC_ARGS pScrn->scrnIndex, 0
+
+#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex)
+#else
+#define SCRN_ARG_TYPE ScrnInfoPtr
+#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
+
+#define SCREEN_ARG_TYPE ScreenPtr
+#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
+
+#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
+
+#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
+#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
+
+#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
+#define CLOSE_SCREEN_ARGS pScreen
+
+#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
+#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode
+
+#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
+
+#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
+#define VT_FUNC_ARGS pScrn
+
+#define XF86_ENABLEDISABLEFB_ARG(x) (x)
+
+#endif
+
+#endif
diff --git a/src/glide_driver.c b/src/glide_driver.c
index 84df77a..149bb32 100644
--- a/src/glide_driver.c
+++ b/src/glide_driver.c
@@ -67,6 +67,8 @@
 #include "xf86cmap.h"
 #include "shadowfb.h"
 
+#include "compat-api.h"
+
 #include <glide.h>
 
 /* glide3x does not define this alias anymore, so let's do it ourselves. */
@@ -107,12 +109,12 @@ static const OptionInfoRec * GLIDEAvailableOptions(int chipid, int busid);
 static void	GLIDEIdentify(int flags);
 static Bool	GLIDEProbe(DriverPtr drv, int flags);
 static Bool	GLIDEPreInit(ScrnInfoPtr pScrn, int flags);
-static Bool	GLIDEScreenInit(int Index, ScreenPtr pScreen, int argc, char **argv);
-static Bool	GLIDEEnterVT(int scrnIndex, int flags);
-static void	GLIDELeaveVT(int scrnIndex, int flags);
-static Bool	GLIDECloseScreen(int scrnIndex, ScreenPtr pScreen);
+static Bool	GLIDEScreenInit(SCREEN_INIT_ARGS_DECL);
+static Bool	GLIDEEnterVT(VT_FUNC_ARGS_DECL);
+static void	GLIDELeaveVT(VT_FUNC_ARGS_DECL);
+static Bool	GLIDECloseScreen(CLOSE_SCREEN_ARGS_DECL);
 static Bool	GLIDESaveScreen(ScreenPtr pScreen, int mode);
-static void     GLIDEFreeScreen(int scrnIndex, int flags);
+static void     GLIDEFreeScreen(FREE_SCREEN_ARGS_DECL);
 static void     GLIDERefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox);
 static Bool     GLIDEModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
 static void     GLIDERestore(ScrnInfoPtr pScrn, Bool Closing);
@@ -573,7 +575,7 @@ GLIDEPreInit(ScrnInfoPtr pScrn, int flags)
 /* Mandatory */
 /* This gets called at the start of each server generation */
 static Bool
-GLIDEScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+GLIDEScreenInit(SCREEN_INIT_ARGS_DECL)
 {
   ScrnInfoPtr pScrn;
   GLIDEPtr pGlide;
@@ -583,7 +585,7 @@ GLIDEScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
   /* 
    * First get the ScrnInfoRec
    */
-  pScrn = xf86Screens[pScreen->myNum];
+  pScrn = xf86ScreenToScrn(pScreen);
 
   pGlide = GLIDEPTR(pScrn);
 
@@ -693,9 +695,9 @@ GLIDEScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
 /* Mandatory */
 static Bool
-GLIDEEnterVT(int scrnIndex, int flags)
+GLIDEEnterVT(VT_FUNC_ARGS_DECL)
 {
-  ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+  SCRN_INFO_PTR(arg);
   return GLIDEModeInit(pScrn, pScrn->currentMode);
 }
 
@@ -708,9 +710,9 @@ GLIDEEnterVT(int scrnIndex, int flags)
 
 /* Mandatory */
 static void
-GLIDELeaveVT(int scrnIndex, int flags)
+GLIDELeaveVT(VT_FUNC_ARGS_DECL)
 {
-  ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+  SCRN_INFO_PTR(arg);
   GLIDERestore(pScrn, FALSE);
 }
 
@@ -723,9 +725,9 @@ GLIDELeaveVT(int scrnIndex, int flags)
 
 /* Mandatory */
 static Bool
-GLIDECloseScreen(int scrnIndex, ScreenPtr pScreen)
+GLIDECloseScreen(CLOSE_SCREEN_ARGS_DECL)
 {
-  ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+  ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
   GLIDEPtr pGlide = GLIDEPTR(pScrn);
 
   if (pScrn->vtSema)
@@ -735,7 +737,7 @@ GLIDECloseScreen(int scrnIndex, ScreenPtr pScreen)
   pScrn->vtSema = FALSE;
 
   pScreen->CloseScreen = pGlide->CloseScreen;
-  return (*pScreen->CloseScreen)(scrnIndex, pScreen);
+  return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
 }
 
 
@@ -743,9 +745,9 @@ GLIDECloseScreen(int scrnIndex, ScreenPtr pScreen)
 
 /* Optional */
 static void
-GLIDEFreeScreen(int scrnIndex, int flags)
+GLIDEFreeScreen(FREE_SCREEN_ARGS_DECL)
 {
-  ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
+  SCRN_INFO_PTR(arg);
   GLIDEPtr pGlide = GLIDEPTR(pScrn);
   /*
    * This only gets called when a screen is being deleted.  It does not
@@ -753,7 +755,7 @@ GLIDEFreeScreen(int scrnIndex, int flags)
    */
   if (pGlide && pGlide->ShadowPtr)
     free(pGlide->ShadowPtr);
-  GLIDEFreeRec(xf86Screens[scrnIndex]);
+  GLIDEFreeRec(pScrn);
 }
 
 
@@ -767,7 +769,7 @@ GLIDESaveScreen(ScreenPtr pScreen, int mode)
   Bool unblank;
   
   unblank = xf86IsUnblank(mode);
-  pScrn = xf86Screens[pScreen->myNum];
+  pScrn = xf86ScreenToScrn(pScreen);
   pGlide = GLIDEPTR(pScrn);
   pGlide->Blanked = !unblank;
   if (unblank)

commit 0b815ca532bbc746a91ffce0bcf7b14ff11abfe8
Author: Guillem Jover <guillem@hadrons.org>
Date:   Fri Jan 20 15:14:55 2012 +0100

    Remove unused xaa.h, xf86Cursor.h and xf86DDC.h inclusions
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/src/glide_driver.c b/src/glide_driver.c
index 9217f0b..84df77a 100644
--- a/src/glide_driver.c
+++ b/src/glide_driver.c
@@ -49,15 +49,12 @@
 #include "config.h"
 #endif
 
-#include "xaa.h"
-#include "xf86Cursor.h"
 #include "colormapst.h"
 #include "xf86.h"
 #include "xf86_OSproc.h"
 #include "mipointer.h"
 #include "mibstore.h"
 #include "micmap.h"
-#include "xf86DDC.h"
 #include "globals.h"
 #ifdef HAVE_XEXTPROTO_71
 #include <X11/extensions/dpmsconst.h>

commit 517e9252f3200f3e96bbfcfe84812b532c1b2933
Author: Guillem Jover <guillem@hadrons.org>
Date:   Fri Dec 30 06:21:19 2011 +0100

    Bump to 1.2.0
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/configure.ac b/configure.ac
index b6defb7..594d711 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-glide],
-        [1.1.0],
+        [1.2.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-glide])
 

commit 7fdaec9032cc069c8dabc719ada40c03aacda2de
Author: Guillem Jover <guillem@hadrons.org>
Date:   Fri Dec 30 06:20:30 2011 +0100

    Update copyright years
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/COPYING b/COPYING
index 096f76a..38e4872 100644
--- a/COPYING
+++ b/COPYING
@@ -21,7 +21,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 
 Copyright © 2005 Adam Jackson.
-Copyright © 2007-2010 Guillem Jover.
+Copyright © 2007-2011 Guillem Jover.
 
 Permission is hereby granted, free of charge, to any person obtaining a
 copy of this software and associated documentation files (the "Software"),
diff --git a/configure.ac b/configure.ac
index 41d5911..b6defb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
 #  Copyright © 2005 Adam Jackson.
-#  Copyright © 2007-2010 Guillem Jover.
+#  Copyright © 2007-2011 Guillem Jover.
 #
 #  Permission is hereby granted, free of charge, to any person obtaining a
 #  copy of this software and associated documentation files (the "Software"),

commit e42689244fd5e1b23e641de46c4dc6d38a243a3b
Author: Guillem Jover <guillem@hadrons.org>
Date:   Fri Dec 30 05:59:46 2011 +0100

    Pass SST number through GLIDERec instead of casting it to driverPrivate
    
    Allocate GLIDERec in GLIDEProbe() instead of in GLIDEPreInit() to pass
    the SST number through the SST_Index member instead of casting it to
    the driverPrivate pointer back and forth.
    
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/src/glide_driver.c b/src/glide_driver.c
index e85ee2d..9217f0b 100644
--- a/src/glide_driver.c
+++ b/src/glide_driver.c
@@ -332,6 +332,8 @@ GLIDEProbe(DriverPtr drv, int flags)
 
         /* Allocate a ScrnInfoRec and claim the slot */
         if ((pScrn = xf86AllocateScreen(drv, 0))) {
+	    GLIDEPtr pGlide;
+
 	    xf86AddEntityToScreen(pScrn, entityIndex);
 	    
 	    /* I'm not going to "claim" the glide device since no other driver than this can drive it */
@@ -348,7 +350,14 @@ GLIDEProbe(DriverPtr drv, int flags)
 	    pScrn->EnterVT	 = GLIDEEnterVT;
 	    pScrn->LeaveVT	 = GLIDELeaveVT;
 	    pScrn->FreeScreen    = GLIDEFreeScreen;
-	    pScrn->driverPrivate = (void*)sst;
+
+	    /* Allocate the GLIDERec driverPrivate */
+	    if (!GLIDEGetRec(pScrn))
+		break;
+
+	    pGlide = GLIDEPTR(pScrn);
+	    pGlide->SST_Index = sst;
+
 	    /*
 	     * XXX This is a hack because don't have the PCI info.  Set it as
 	     * an ISA entity with no resources.
@@ -376,7 +385,6 @@ GLIDEPreInit(ScrnInfoPtr pScrn, int flags)
   MessageType from;
   int i;
   ClockRangePtr clockRanges;
-  int sst;
 
   if (flags & PROBE_DETECT) return FALSE;
 
@@ -384,9 +392,6 @@ GLIDEPreInit(ScrnInfoPtr pScrn, int flags)
   if (pScrn->numEntities != 1)
     return FALSE;
 
-  sst = (int)(pScrn->driverPrivate);
-  pScrn->driverPrivate = NULL;
-
   /* Set pScrn->monitor */
   pScrn->monitor = pScrn->confScreen->monitor;
 
@@ -448,11 +453,6 @@ GLIDEPreInit(ScrnInfoPtr pScrn, int flags)
   /* We use a programmable clock */
   pScrn->progClock = TRUE;
 
-  /* Allocate the GLIDERec driverPrivate */
-  if (!GLIDEGetRec(pScrn)) {
-    return FALSE;
-  }
-
   pGlide = GLIDEPTR(pScrn);
 
   /* Get the entity */
@@ -477,8 +477,6 @@ GLIDEPreInit(ScrnInfoPtr pScrn, int flags)
              "Voodoo card will be %s when exiting server.\n", 
              pGlide->OnAtExit ? "ON" : "OFF");
 
-  pGlide->SST_Index = sst;
-
   /*
    * If the user has specified the amount of memory in the XF86Config
    * file, we respect that setting.

commit 518b189f31ee7b85d28541bf32bbcf10b5337289
Author: Guillem Jover <guillem@hadrons.org>
Date:   Tue Jul 19 15:32:56 2011 +0200

    Stop using the deprecated LoaderSymbol() function
    
    Instead of using dlsym() to replace LoaderSymbol() and keep loading
    libglide at run-time, just switch to dyamically linking it.
    
    This in effect makes the module stop using LoaderSymbol() function,
    and as a bonus makes it start using proper linker dependencies.
    
    Reported-by: Daniel Stone <daniel@fooishbar.org>
    Signed-off-by: Guillem Jover <guillem@hadrons.org>

diff --git a/configure.ac b/configure.ac
index 2c2012a..41d5911 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,6 +69,11 @@ PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
 AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
 
 # Checks for libraries.
+AC_CHECK_LIB([glide3x], [grGet], [GLIDE_LDFLAGS="-lglide3x"], [
+  AC_CHECK_LIB([glide2x], [grSstQueryBoards], [GLIDE_LDFLAGS="-lglide2x"], [
+    AC_MSG_ERROR([missing glide shared library])], [])], [])
+
+AC_SUBST([GLIDE_LDFLAGS])
 
 # Checks for header files.
 CPPFLAGS="$CPPFLAGS -I$glideincludedir"
diff --git a/src/Makefile.am b/src/Makefile.am
index 383a62d..b8015dc 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -23,8 +23,9 @@
 # -avoid-version prevents gratuitous .0.0.0 version numbers on the end
 # _ladir passes a dummy rpath to libtool so the thing will actually link
 # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @XORG_CFLAGS@ @GLIDE_CFLAGS@ -DMODULEDIR=\""@moduledir@\""
+AM_CFLAGS = @XORG_CFLAGS@ @GLIDE_CFLAGS@
 glide_drv_la_LTLIBRARIES = glide_drv.la
+glide_drv_la_LIBADD = @GLIDE_LDFLAGS@
 glide_drv_la_LDFLAGS = -module -avoid-version
 glide_drv_ladir = @moduledir@/drivers
 
diff --git a/src/glide_driver.c b/src/glide_driver.c
index 4f16a06..e85ee2d 100644
--- a/src/glide_driver.c
+++ b/src/glide_driver.c
@@ -92,34 +92,6 @@ typedef u8                 bool;
 
 #define GLIDEPTR(p) ((GLIDEPtr)((p)->driverPrivate))
 
-
-#if defined(GLIDE3)
-typedef FxU32 (*pgrGet_t)(FxU32 pname, FxU32 plength, FxI32 *params);
-#else
-typedef FxBool (*pgrSstQueryBoards_t)(GrHwConfiguration*);
-#endif
-typedef void (*pgrGlideInit_t)(void);
-typedef void (*pgrSstSelect_t)(int which_sst);
-typedef FxBool (*pgrSstWinOpen_t)(FxU32, GrScreenResolution_t, GrScreenRefresh_t, 
-                                  GrColorFormat_t, GrOriginLocation_t, int, int);
-typedef void (*pgrRenderBuffer_t)(GrBuffer_t);
-typedef void (*pgrClipWindow_t)(FxU32, FxU32, FxU32, FxU32);
-typedef void (*pgrBufferClear_t)(GrColor_t, GrAlpha_t, FxU16);
-typedef FxBool (*pgrLfbLock_t)(GrLock_t, GrBuffer_t, GrLfbWriteMode_t, GrOriginLocation_t, 
-                               FxBool, GrLfbInfo_t*);
-typedef FxBool (*pgrLfbUnlock_t)(GrLock_t, GrBuffer_t);
-typedef void (*pgrGlideShutdown_t)(void);
-
-
-#if defined(GLIDE3) && defined(GLIDE3_ALPHA)
-typedef FxBool (*pgrLfbWriteRegion_t)(GrBuffer_t, FxU32, FxU32, GrLfbSrcFmt_t, 
-                                     FxU32, FxU32, FxBool, FxI32, void*);
-#else
-typedef FxBool (*pgrLfbWriteRegion_t)(GrBuffer_t, FxU32, FxU32, GrLfbSrcFmt_t, 
-                                     FxU32, FxU32, FxI32, void*);
-#endif
-
-
 typedef struct {
   u8*                 ShadowPtr;
   u32                 ShadowPitch;
@@ -134,22 +106,6 @@ typedef struct {
   OptionInfoPtr       Options;
 } GLIDERec, *GLIDEPtr;
 
-#if defined(GLIDE3)
-static pgrGet_t pgrGet;
-#else
-static pgrSstQueryBoards_t pgrSstQueryBoards;
-#endif
-static pgrGlideInit_t      pgrGlideInit;
-static pgrSstSelect_t      pgrSstSelect;
-static pgrSstWinOpen_t     pgrSstWinOpen;
-static pgrRenderBuffer_t   pgrRenderBuffer;
-static pgrClipWindow_t     pgrClipWindow;
-static pgrBufferClear_t    pgrBufferClear;
-static pgrLfbLock_t        pgrLfbLock;
-static pgrLfbUnlock_t      pgrLfbUnlock;
-static pgrGlideShutdown_t  pgrGlideShutdown;
-static pgrLfbWriteRegion_t pgrLfbWriteRegion;
-
 static const OptionInfoRec * GLIDEAvailableOptions(int chipid, int busid);
 static void	GLIDEIdentify(int flags);
 static Bool	GLIDEProbe(DriverPtr drv, int flags);
@@ -170,16 +126,9 @@ static void	GLIDEDisplayPowerManagementSet(ScrnInfoPtr pScrn,
                                                int flags);
 
 
-static int LoadGlide(void);
-
 #define GLIDE_VERSION 4000
 #define GLIDE_NAME "GLIDE"
 #define GLIDE_DRIVER_NAME "glide"
-#ifdef GLIDE3
-#define GLIDE_MODULE_NAME "glide3x"
-#else
-#define GLIDE_MODULE_NAME "glide2x"
-#endif
 #define GLIDE_MAJOR_VERSION PACKAGE_VERSION_MAJOR
 #define GLIDE_MINOR_VERSION PACKAGE_VERSION_MINOR
 #define GLIDE_PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL
@@ -243,50 +192,11 @@ _X_EXPORT XF86ModuleData glideModuleData = { &glideVersRec, glideSetup, NULL };
 static pointer
 glideSetup(pointer module, pointer opts, int *errmaj, int *errmin)
 {
-  const char module_name[] = GLIDE_MODULE_NAME;
   static Bool setupDone = FALSE;
-  pointer ret;
   int errmaj2 = 0, errmin2 = 0;
     
   if (!setupDone) 
   {
-    /*
-     * Modules that this driver always requires may be loaded here
-     * by calling LoadSubModule().
-     */
-
-    ret = LoadSubModule(module, module_name, NULL, NULL, EXTERN_MODULE, NULL,
-			&errmaj2, &errmin2);
-    if (!ret)
-    {
-      xf86Msg(X_ERROR, "Glide driver:\n"
-"\n"
-"Could not load the shared library file for Glide: \"lib%s.so\"! \n"
-"\n"
-"You need to have Glide installed to run the glide driver for X.Org.\n"
-"Also, you need to tell X.Org where the lib%s.so file is placed\n"
-"by making a soft link in the " MODULEDIR " directory that points\n"
-"to the lib%s.so file. For example (if your lib%s.so file is in\n"
-"/usr/lib):\n"
-"\n"
-"  # ln -s /usr/lib/lib%s.so " MODULEDIR "\n"
-"\n"
-"\n", module_name, module_name, module_name, module_name, module_name);
-      if (errmaj)
-        *errmaj = LDR_NOSUBENT;
-      if (errmin)
-        *errmin = errmaj2;
-      return NULL;
-    }
-
-    if (!LoadGlide()) {
-      if (errmaj)
-        *errmaj = LDR_MODSPECIFIC;
-      if (errmin)
-        *errmin = 0;
-      return NULL;
-    }
-
     setupDone = TRUE;
     /* This module should be loaded only once */
     *errmaj = LDR_ONCEONLY;
@@ -355,10 +265,10 @@ glide_get_num_boards(void)
   FxI32 num_sst;
   int r;
 
-  r = pgrGet(GR_NUM_BOARDS, sizeof(num_sst), &num_sst);
+  r = grGet(GR_NUM_BOARDS, sizeof(num_sst), &num_sst);
   if (!r)
   {
-    xf86Msg(X_ERROR, "GLIDEProbe(): Error calling pgrGet(GR_NUM_BOARDS)!\n");
+    xf86Msg(X_ERROR, "GLIDEProbe(): Error calling grGet(GR_NUM_BOARDS)!\n");
     return -1;
   }
 
@@ -371,10 +281,10 @@ glide_get_num_boards(void)
   GrHwConfiguration hw;
   int r;
 
-  r = pgrSstQueryBoards(&hw);
+  r = grSstQueryBoards(&hw);
   if (!r)
   {
-    xf86Msg(X_ERROR, "GLIDEProbe(): Error calling pgrSstQueryBoards!\n");
+    xf86Msg(X_ERROR, "GLIDEProbe(): Error calling grSstQueryBoards!\n");
     return -1;
   }
 
@@ -868,7 +778,7 @@ GLIDESaveScreen(ScreenPtr pScreen, int mode)
   if (unblank)
     GLIDERefreshAll(pScrn);
   else
-    pgrBufferClear(0, 0, GR_ZDEPTHVALUE_FARTHEST);
+    grBufferClear(0, 0, GR_ZDEPTHVALUE_FARTHEST);
 
   return TRUE;
 }
@@ -954,15 +864,15 @@ GLIDEModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
 
 
   /* Initialize the video card */
-  pgrGlideInit();
-  pgrSstSelect(pGlide->SST_Index);
-
-  r = pgrSstWinOpen(0,
-                    pGlide->grResolution,
-                    pGlide->grRefreshRate,
-                    GR_COLORFORMAT_ARGB,
-                    GR_ORIGIN_UPPER_LEFT,
-                    2, 0);
+  grGlideInit();
+  grSstSelect(pGlide->SST_Index);
+
+  r = grSstWinOpen(0,
+                   pGlide->grResolution,
+                   pGlide->grRefreshRate,
+                   GR_COLORFORMAT_ARGB,
+                   GR_ORIGIN_UPPER_LEFT,
+                   2, 0);
   if (!r)
   {
     xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "grSstWinOpen returned %d. "
@@ -970,9 +880,9 @@ GLIDEModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
     return FALSE;
   }
 
-  pgrRenderBuffer(GR_BUFFER_FRONTBUFFER);
-  pgrClipWindow(0, 0, 1024, 768);
-  pgrBufferClear(0, 0, GR_ZDEPTHVALUE_FARTHEST);
+  grRenderBuffer(GR_BUFFER_FRONTBUFFER);
+  grClipWindow(0, 0, 1024, 768);
+  grBufferClear(0, 0, GR_ZDEPTHVALUE_FARTHEST);
 
   if (!r)
   {
@@ -996,39 +906,9 @@ GLIDERestore(ScrnInfoPtr pScrn, Bool Closing)
     return;
   pGlide->GlideInitiated = FALSE;
   pGlide->Blanked = TRUE;
-  pgrBufferClear(0, 0, GR_ZDEPTHVALUE_FARTHEST);
+  grBufferClear(0, 0, GR_ZDEPTHVALUE_FARTHEST);
   if (!Closing || !(pGlide->OnAtExit))
-    pgrGlideShutdown();
-}
-
-
-#define GLIDE_FIND_FUNC(x) \
-  p##x = (p##x##_t)LoaderSymbol(#x); \
-  if (!p##x) \
-  { \
-    xf86Msg(X_ERROR, "Could not find " #x "() in lib%s.so.\n", GLIDE_MODULE_NAME); \
-    return FALSE; \
-  }
-
-static int
-LoadGlide(void)
-{
-#ifdef GLIDE3
-  GLIDE_FIND_FUNC(grGet);
-#else
-  GLIDE_FIND_FUNC(grSstQueryBoards);
-#endif
-  GLIDE_FIND_FUNC(grGlideInit);
-  GLIDE_FIND_FUNC(grSstSelect);
-  GLIDE_FIND_FUNC(grSstWinOpen);
-  GLIDE_FIND_FUNC(grRenderBuffer);
-  GLIDE_FIND_FUNC(grClipWindow);
-  GLIDE_FIND_FUNC(grBufferClear);
-  GLIDE_FIND_FUNC(grLfbLock);
-  GLIDE_FIND_FUNC(grLfbUnlock);
-  GLIDE_FIND_FUNC(grGlideShutdown);
-  GLIDE_FIND_FUNC(grLfbWriteRegion);
-  return TRUE;
+    grGlideShutdown();
 }
 
 static void
@@ -1052,13 +932,13 @@ GLIDERefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
       src = pGlide->ShadowPtr + (pbox->y1 * pGlide->ShadowPitch) + 
             (x1 * Bpp);
 #if defined(GLIDE3) && defined(GLIDE3_ALPHA)
-      pgrLfbWriteRegion(GR_BUFFER_FRONTBUFFER, x1, pbox->y1, 
-                        GR_LFB_SRC_FMT_565, x2-x1, pbox->y2-pbox->y1, FALSE,
-                        pGlide->ShadowPitch, src);
+      grLfbWriteRegion(GR_BUFFER_FRONTBUFFER, x1, pbox->y1,
+                       GR_LFB_SRC_FMT_565, x2-x1, pbox->y2-pbox->y1, FALSE,
+                       pGlide->ShadowPitch, src);
 #else
-      pgrLfbWriteRegion(GR_BUFFER_FRONTBUFFER, x1, pbox->y1, 
-                        GR_LFB_SRC_FMT_565, x2-x1, pbox->y2-pbox->y1, 
-                        pGlide->ShadowPitch, src);
+      grLfbWriteRegion(GR_BUFFER_FRONTBUFFER, x1, pbox->y1,
+                       GR_LFB_SRC_FMT_565, x2-x1, pbox->y2-pbox->y1,
+                       pGlide->ShadowPitch, src);
 #endif
       pbox++;
     }
@@ -1071,13 +951,13 @@ GLIDERefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox)
       src = pGlide->ShadowPtr + (pbox->y1 * pGlide->ShadowPitch) + 
             (pbox->x1 * Bpp);
 #if defined(GLIDE3) && defined(GLIDE3_ALPHA)
-      pgrLfbWriteRegion(GR_BUFFER_FRONTBUFFER, x1, pbox->y1, 
-                        GR_LFB_SRC_FMT_888, x2-x1, pbox->y2-pbox->y1, FALSE,
-                        pGlide->ShadowPitch, src);
+      grLfbWriteRegion(GR_BUFFER_FRONTBUFFER, x1, pbox->y1,
+                       GR_LFB_SRC_FMT_888, x2-x1, pbox->y2-pbox->y1, FALSE,
+                       pGlide->ShadowPitch, src);
 #else
-      pgrLfbWriteRegion(GR_BUFFER_FRONTBUFFER, x1, pbox->y1, 
-                        GR_LFB_SRC_FMT_888, x2-x1, pbox->y2-pbox->y1, 
-                        pGlide->ShadowPitch, src);
+      grLfbWriteRegion(GR_BUFFER_FRONTBUFFER, x1, pbox->y1,
+                       GR_LFB_SRC_FMT_888, x2-x1, pbox->y2-pbox->y1,
+                       pGlide->ShadowPitch, src);
 #endif
       pbox++;
     }
@@ -1116,7 +996,7 @@ GLIDEDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode,
   case DPMSModeStandby:
   case DPMSModeSuspend:
     pGlide->Blanked = TRUE;
-    pgrBufferClear(0, 0, GR_ZDEPTHVALUE_FARTHEST);
+    grBufferClear(0, 0, GR_ZDEPTHVALUE_FARTHEST);
     break;
   case DPMSModeOff:
     GLIDERestore(pScrn, FALSE);

commit 8ffb28cda58be37d52ed8f7c3b9967574f0a4233
Author: Guillem Jover <guillem@hadrons.org>
Date:   Tue Jul 19 17:56:32 2011 +0200

    build: Define GLIDE3_ALPHA when using glide3

diff --git a/configure.ac b/configure.ac
index 3d1f278..2c2012a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,7 +76,10 @@ AC_HEADER_STDC
 AC_CHECK_HEADER([glide.h], [],
                 [AC_MSG_ERROR([<glide.h> is required])])
 
-AC_CHECK_DECL([grGet], [AC_DEFINE(GLIDE3, 1, [glide3x available])], [],
+AC_CHECK_DECL([grGet],
+              [AC_DEFINE(GLIDE3, 1, [glide3x available])
+               AC_DEFINE(GLIDE3_ALPHA, 1, [glide3x alpha available])],
+              [],
               [#include <glide.h>])
 
 GLIDE_CFLAGS="-I$glideincludedir"

commit 76a838e31d3b702b0489792e9cc13018fa331749
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Nov 21 11:38:44 2010 -0800

    Sun's copyrights belong to Oracle now
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/COPYING b/COPYING
index ab7e916..096f76a 100644
--- a/COPYING
+++ b/COPYING
@@ -42,7 +42,7 @@ 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.
 
 
-Copyright © 2005 Sun Microsystems, Inc.  All rights reserved.
+Copyright (c) 2005, Oracle and/or its affiliates. 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"),
diff --git a/man/Makefile.am b/man/Makefile.am
index 52648f9..32aeba3 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright © 2005 Sun Microsystems, Inc.  All rights reserved.
+# Copyright (c) 2005, Oracle and/or its affiliates. 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"),


Reply to: