From 222a212569874e0648efd540fd81be2cc46cd445 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Mon, 20 Jan 2003 10:53:34 +0000 Subject: [PATCH] Build radeon.o from toplevel makefile. Add comments to example.miniglx.conf. Install a minglx.conf in lib directory. Remove unused 'drmModuleName' config option --- .../drivers/dri/radeon/server/radeon_dri.c | 2 +- src/miniglx/Makefile | 4 ++- src/miniglx/example.miniglx.conf | 26 ++++++++++++++++--- src/miniglx/miniglx.c | 7 ++--- src/miniglx/miniglxP.h | 5 +++- 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/server/radeon_dri.c b/src/mesa/drivers/dri/radeon/server/radeon_dri.c index f1adf11d05f..bb679b1c4f9 100644 --- a/src/mesa/drivers/dri/radeon/server/radeon_dri.c +++ b/src/mesa/drivers/dri/radeon/server/radeon_dri.c @@ -470,7 +470,7 @@ static int RADEONScreenInit( struct MiniGLXDisplayRec *dpy, RADEONInfoPtr info ) /* Note that drmOpen will try to load the kernel module, if needed. */ - dpy->drmFD = drmOpen(dpy->drmModuleName, NULL ); + dpy->drmFD = drmOpen("radeon", NULL ); if (dpy->drmFD < 0) { /* failed to open DRM */ fprintf(stderr, "[drm] drmOpen failed\n"); diff --git a/src/miniglx/Makefile b/src/miniglx/Makefile index a55fb0910e4..1baafa5466b 100644 --- a/src/miniglx/Makefile +++ b/src/miniglx/Makefile @@ -26,10 +26,12 @@ libGL.so.1.2: $(OBJS) Makefile gcc -shared -Wl,-soname,libGL.so -Wl,-Bsymbolic $(OBJS) $(LIBS) -o $@ install: - rm -f $(MESA)/lib/libGL.so* + rm -f $(MESA)/lib/libGL.so* + rm -f $(MESA)/lib/miniglx.conf install -D libGL.so.1.2 $(MESA)/lib/libGL.so.1.2 ln -s libGL.so.1.2 $(MESA)/lib/libGL.so.1 ln -s libGL.so.1 $(MESA)/lib/libGL.so + install example.miniglx.conf $(MESA)/lib/miniglx.conf #miniglx.a: $(OBJECTS) Makefile # rm -f $@ && ar rcv $@ $(OBJECTS) && ranlib $@ diff --git a/src/miniglx/example.miniglx.conf b/src/miniglx/example.miniglx.conf index 8ca5ae0bfd3..4cf20c0a5d7 100644 --- a/src/miniglx/example.miniglx.conf +++ b/src/miniglx/example.miniglx.conf @@ -1,5 +1,23 @@ -fbdevDevice = /dev/fb0 -clientDriverName=radeon_dri.so -drmModuleName = radeon -pciBusID = PCI:1:0:0 +# Example miniglx configuration file (/etc/miniglx.conf) +# +# Framebuffer device to open: Might need to change this on dual-head +# systems. +fbdevDevice=/dev/fb0 + +# Which driver? +# radeon_dri.so -- HW accelerated radeon driver +# fb_dri.so -- Software rasterizer +clientDriverName=radeon_dri.so + +# The pci bus id of the video card. Find this with scanpci, lspci or +# look in /proc/pci. +pciBusID=PCI:1:0:0 + +# Virtual screen dimensions. Can reduce this to save videocard memory +# at the expense of maximum window size available. +virtualWidth=1280 +virtualHeight=1024 + +# Screen depth. Only 16 & 32bpp supported. +bpp=32 diff --git a/src/miniglx/miniglx.c b/src/miniglx/miniglx.c index d69ad4c103d..63aba09d743 100644 --- a/src/miniglx/miniglx.c +++ b/src/miniglx/miniglx.c @@ -22,7 +22,7 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* $Id: miniglx.c,v 1.1.4.43 2003/01/19 23:48:32 brianp Exp $ */ +/* $Id: miniglx.c,v 1.1.4.44 2003/01/20 10:53:35 keithw Exp $ */ /** @@ -737,7 +737,6 @@ static int __read_config_file( Display *dpy ) */ dpy->fbdevDevice = "/dev/fb0"; dpy->clientDriverName = "fb_dri.so"; - dpy->drmModuleName = 0; dpy->pciBus = 0; dpy->pciDevice = 0; dpy->pciFunc = 0; @@ -753,7 +752,7 @@ static int __read_config_file( Display *dpy ) file = fopen(fname, "r"); if (!file) { - fprintf(stderr, "couldn't open config file %s\n", fname); + fprintf(stderr, "couldn't open config file %s: %s\n", fname, strerror(errno)); return 0; } @@ -783,8 +782,6 @@ static int __read_config_file( Display *dpy ) dpy->fbdevDevice = strdup(val); else if (strcmp(opt, "clientDriverName") == 0) dpy->clientDriverName = strdup(val); - else if (strcmp(opt, "drmModuleName") == 0) - dpy->drmModuleName = strdup(val); else if (strcmp(opt, "pciBusID") == 0) { if (sscanf(val, "PCI:%d:%d:%d", &dpy->pciBus, &dpy->pciDevice, &dpy->pciFunc) != 3) { diff --git a/src/miniglx/miniglxP.h b/src/miniglx/miniglxP.h index 57e642efc66..572a211be91 100644 --- a/src/miniglx/miniglxP.h +++ b/src/miniglx/miniglxP.h @@ -190,6 +190,10 @@ struct MiniGLXDriverRec { */ int (*validateMode)( struct MiniGLXDisplayRec *dpy ); + /** + * \brief Examine mode returned by fbdev (may differ from the one + * requested), restore any hw regs clobbered by fbdev. + */ int (*postValidateMode)( struct MiniGLXDisplayRec *dpy ); /** @@ -328,7 +332,6 @@ struct MiniGLXDisplayRec { /*@{*/ const char *fbdevDevice; const char *clientDriverName; - const char *drmModuleName; const char *pciBusID; int pciBus; int pciDevice;