From 5d8f7b1197f641edbc0ed18d96a431e95e1923b5 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Wed, 14 Apr 2004 01:33:27 +0000 Subject: add agpmode to miniglx config file --- src/glx/mini/driver.h | 1 + src/glx/mini/miniglx.c | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'src/glx/mini') diff --git a/src/glx/mini/driver.h b/src/glx/mini/driver.h index a619ad4449..3d3476453c 100644 --- a/src/glx/mini/driver.h +++ b/src/glx/mini/driver.h @@ -66,6 +66,7 @@ typedef struct DRIDriverContextRec { int chipset; int bpp; int cpp; + int agpmode; unsigned long FBStart; /**< \brief physical address of the framebuffer */ unsigned long MMIOStart; /**< \brief physical address of the MMIO region */ diff --git a/src/glx/mini/miniglx.c b/src/glx/mini/miniglx.c index 00144a5f6a..d751c2efa5 100644 --- a/src/glx/mini/miniglx.c +++ b/src/glx/mini/miniglx.c @@ -793,6 +793,7 @@ static int __read_config_file( Display *dpy ) dpy->driverContext.bpp = 32; dpy->driverContext.cpp = 4; dpy->rotateMode = 0; + dpy->driverContext.agpmode = 1; fname = getenv("MINIGLX_CONF"); if (!fname) fname = "/etc/miniglx.conf"; @@ -858,6 +859,10 @@ static int __read_config_file( Display *dpy ) fprintf(stderr, "malformed bpp: %s\n", opt); dpy->driverContext.cpp = dpy->driverContext.bpp / 8; } + else if (strcmp(opt, "agpmode") == 0) { + if (sscanf(val, "%d", &dpy->driverContext.agpmode) != 1) + fprintf(stderr, "malformed agpmode: %s\n", opt); + } } fclose(file); -- cgit v1.2.3