diff options
author | Dave Airlie <airliedfreedesktop.org> | 2004-12-08 06:15:01 +0000 |
---|---|---|
committer | Dave Airlie <airliedfreedesktop.org> | 2004-12-08 06:15:01 +0000 |
commit | 23b033ad28331e40287ab8b5c9150bc6be5c608f (patch) | |
tree | 187c1d942cd620b7b533d727b92cee24f3c422d8 /src/glx | |
parent | e1b4fec71c1a22ea7415a115700802a93b52fcc7 (diff) |
From: Stephane Marchesin <[email protected]>
Attached is a patch that adds pci init code for mesa solo on radeon. It's been
tested on an itanium 2 with a radeon 7000 and it works here.
The patch adds a new field in the miniglx.conf config file, to choose between
pci and agp.
Diffstat (limited to 'src/glx')
-rw-r--r-- | src/glx/mini/driver.h | 3 | ||||
-rw-r--r-- | src/glx/mini/example.miniglx.conf | 3 | ||||
-rw-r--r-- | src/glx/mini/miniglx.c | 4 |
3 files changed, 9 insertions, 1 deletions
diff --git a/src/glx/mini/driver.h b/src/glx/mini/driver.h index 7bf4b868126..6ce339d98d4 100644 --- a/src/glx/mini/driver.h +++ b/src/glx/mini/driver.h @@ -67,7 +67,8 @@ typedef struct DRIDriverContextRec { int bpp; int cpp; int agpmode; - + int isPCI; + 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/example.miniglx.conf b/src/glx/mini/example.miniglx.conf index 7186b31d92d..1f39f7958bd 100644 --- a/src/glx/mini/example.miniglx.conf +++ b/src/glx/mini/example.miniglx.conf @@ -14,6 +14,9 @@ clientDriverName=radeon_dri.so # look in /proc/pci. pciBusID=PCI:1:0:0 +# Is the card PCI or AGP ? +isPCI=0 + # Virtual screen dimensions. Can reduce this to save videocard memory # at the expense of maximum window size available. virtualWidth=1280 diff --git a/src/glx/mini/miniglx.c b/src/glx/mini/miniglx.c index 5793aa3fb8e..b4f74a12791 100644 --- a/src/glx/mini/miniglx.c +++ b/src/glx/mini/miniglx.c @@ -830,6 +830,7 @@ static int __read_config_file( Display *dpy ) dpy->driverContext.cpp = 4; dpy->rotateMode = 0; dpy->driverContext.agpmode = 1; + dpy->driverContext.isPCI = 0; fname = getenv("MINIGLX_CONF"); if (!fname) fname = "/etc/miniglx.conf"; @@ -899,6 +900,9 @@ static int __read_config_file( Display *dpy ) if (sscanf(val, "%d", &dpy->driverContext.agpmode) != 1) fprintf(stderr, "malformed agpmode: %s\n", opt); } + else if (strcmp(opt, "isPCI") == 0) { + dpy->driverContext.isPCI = atoi(val) ? 1 : 0; + } } fclose(file); |