diff options
-rw-r--r-- | src/glx/mini/miniglx.c | 34 | ||||
-rw-r--r-- | src/glx/mini/miniglxP.h | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/Makefile.template | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/fb/fb_dri.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r128/server/r128_dri.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/server/radeon_dri.c | 2 |
6 files changed, 7 insertions, 45 deletions
diff --git a/src/glx/mini/miniglx.c b/src/glx/mini/miniglx.c index 31bd9cc034e..1a0acf832f0 100644 --- a/src/glx/mini/miniglx.c +++ b/src/glx/mini/miniglx.c @@ -911,24 +911,6 @@ static int __read_config_file( Display *dpy ) static int InitDriver( Display *dpy ) { - char * str; - char * srvLibname = NULL; - - srvLibname = strdup(dpy->clientDriverName); - if (!srvLibname) { - goto failed; - } - - /* - * Construct server library name. Assume clientDriverName ends - * with dri.so. Replace dri.so with srv.so. - */ - str = strstr(srvLibname, "dri.so"); - if (!str) { - goto failed; - } - strcpy(str, "srv.so"); - /* * Begin DRI setup. * We're kind of combining the per-display and per-screen information @@ -941,16 +923,9 @@ static int InitDriver( Display *dpy ) goto failed; } - dpy->dlHandleSrv = dlopen(srvLibname, RTLD_NOW | RTLD_GLOBAL); - if (!dpy->dlHandleSrv) { - fprintf(stderr, "Unable to open %s: %s\n", dpy->clientDriverName, - dlerror()); - goto failed; - } - /* Pull in Mini GLX specific hooks: */ - dpy->driver = (struct DRIDriverRec *) dlsym(dpy->dlHandleSrv, + dpy->driver = (struct DRIDriverRec *) dlsym(dpy->dlHandle, "__driDriver"); if (!dpy->driver) { fprintf(stderr, "Couldn't find __driDriver in %s\n", @@ -971,13 +946,6 @@ static int InitDriver( Display *dpy ) return GL_TRUE; failed: - if (srvLibname) { - free(srvLibname); - } - if (dpy->dlHandleSrv) { - dlclose(dpy->dlHandleSrv); - dpy->dlHandleSrv = 0; - } if (dpy->dlHandle) { dlclose(dpy->dlHandle); dpy->dlHandle = 0; diff --git a/src/glx/mini/miniglxP.h b/src/glx/mini/miniglxP.h index ce0eafe17e3..9169f7ece17 100644 --- a/src/glx/mini/miniglxP.h +++ b/src/glx/mini/miniglxP.h @@ -166,10 +166,6 @@ struct MiniGLXDisplayRec { * \brief handle to the client dynamic * library */ - void *dlHandleSrv; /**< - * \brief handle to the server dynamic - * library - */ /*@}*/ /** diff --git a/src/mesa/drivers/dri/Makefile.template b/src/mesa/drivers/dri/Makefile.template index 29558c9e291..fa1bc2993fb 100644 --- a/src/mesa/drivers/dri/Makefile.template +++ b/src/mesa/drivers/dri/Makefile.template @@ -1,7 +1,5 @@ # -*-makefile-*- -TOP = ../../../../.. - MESA_MODULES = $(TOP)/src/mesa/mesa.a @@ -36,7 +34,7 @@ endif ### Include directories SHARED_INCLUDES = \ -I. \ - -I../common \ + -I$(TOP)/src/mesa/drivers/dri/common \ -Iserver \ -I$(DRM_SOURCE_PATH)/shared \ -I$(TOP)/include \ @@ -75,7 +73,7 @@ default: depend symlinks $(LIB_DIR)/$(LIBNAME) # $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES) $(OBJECTS) -$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile ../Makefile.template +$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile $(TOP)/src/mesa/drivers/dri/Makefile.template rm -f $@ && gcc -o $@ -shared $(OBJECTS) $(MESA_MODULES) $(WINOBJ) $(GL_LIB_DEPS) diff --git a/src/mesa/drivers/dri/fb/fb_dri.c b/src/mesa/drivers/dri/fb/fb_dri.c index d5ea98b5be4..97f4e34f156 100644 --- a/src/mesa/drivers/dri/fb/fb_dri.c +++ b/src/mesa/drivers/dri/fb/fb_dri.c @@ -657,7 +657,7 @@ __driInitFBDev( struct DRIDriverContextRec *ctx ) ctx->shared.hFrameBuffer = ctx->FBStart; ctx->shared.fbSize = ctx->FBSize; ctx->shared.hSAREA = 0xB37D; - ctx->shared.SAREASize = DRM_PAGE_SIZE; + ctx->shared.SAREASize = SAREA_MAX; id = shmget(ctx->shared.hSAREA, ctx->shared.SAREASize, IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR); if (id == -1) { /* segment will already exist if previous server segfaulted */ @@ -672,7 +672,7 @@ __driInitFBDev( struct DRIDriverContextRec *ctx ) fprintf(stderr, "fb: shmat failed\n"); return 0; } - memset(ctx->pSAREA, 0, DRM_PAGE_SIZE); + memset(ctx->pSAREA, 0, SAREA_MAX); return 1; } diff --git a/src/mesa/drivers/dri/r128/server/r128_dri.c b/src/mesa/drivers/dri/r128/server/r128_dri.c index 6d577483cc0..fff2549aefb 100644 --- a/src/mesa/drivers/dri/r128/server/r128_dri.c +++ b/src/mesa/drivers/dri/r128/server/r128_dri.c @@ -747,7 +747,7 @@ static GLboolean R128DRIScreenInit(DRIDriverContext *ctx) } info->registerSize = ctx->MMIOSize; - ctx->shared.SAREASize = DRM_PAGE_SIZE; + ctx->shared.SAREASize = SAREA_MAX; /* Note that drmOpen will try to load the kernel module, if needed. */ ctx->drmFD = drmOpen("r128", NULL ); diff --git a/src/mesa/drivers/dri/radeon/server/radeon_dri.c b/src/mesa/drivers/dri/radeon/server/radeon_dri.c index 6521ea81248..b7e8026c5a3 100644 --- a/src/mesa/drivers/dri/radeon/server/radeon_dri.c +++ b/src/mesa/drivers/dri/radeon/server/radeon_dri.c @@ -767,7 +767,7 @@ static int RADEONScreenInit( DRIDriverContext *ctx, RADEONInfoPtr info ) } info->registerSize = ctx->MMIOSize; - ctx->shared.SAREASize = DRM_PAGE_SIZE; + ctx->shared.SAREASize = SAREA_MAX; /* Note that drmOpen will try to load the kernel module, if needed. */ ctx->drmFD = drmOpen("radeon", NULL ); |