summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/dri/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-03-13 18:08:22 +1100
committerBen Skeggs <skeggsb@gmail.com>2008-03-13 18:08:22 +1100
commit1cec61e441ad5b4b1ac8d1abcaa7535bc1827eb3 (patch)
tree1a5c527340e116ca9cbe6e19bf2233194893bd67 /src/gallium/winsys/dri/nouveau
parent9a4938d7033101122b627786273ff37229b5558a (diff)
nouveau: NV9X is basically a G80, fix issue with NV6X being detected as G80.
Diffstat (limited to 'src/gallium/winsys/dri/nouveau')
-rw-r--r--src/gallium/winsys/dri/nouveau/nouveau_context.c42
-rw-r--r--src/gallium/winsys/dri/nouveau/nouveau_winsys.c1
2 files changed, 36 insertions, 7 deletions
diff --git a/src/gallium/winsys/dri/nouveau/nouveau_context.c b/src/gallium/winsys/dri/nouveau/nouveau_context.c
index 8dac08a5d2..8b20b3689c 100644
--- a/src/gallium/winsys/dri/nouveau/nouveau_context.c
+++ b/src/gallium/winsys/dri/nouveau/nouveau_context.c
@@ -75,6 +75,7 @@ nouveau_channel_context_create(struct nouveau_device *nvdev, unsigned chipset)
switch (chipset & 0xf0) {
case 0x50:
case 0x80:
+ case 0x90:
ret = nouveau_surface_channel_create_nv50(nvc);
break;
default:
@@ -109,6 +110,7 @@ nouveau_context_create(const __GLcontextModes *glVis,
st_share = ((struct nouveau_context *)sharedContextPrivate)->st;
}
+ /* Check for supported arch */
if ((ret = nouveau_device_get_param(nv_screen->device,
NOUVEAU_GETPARAM_CHIPSET_ID,
&nv->chipset))) {
@@ -116,6 +118,22 @@ nouveau_context_create(const __GLcontextModes *glVis,
return GL_FALSE;
}
+ switch (nv->chipset & 0xf0) {
+ case 0x30:
+ /* NV30 */
+ case 0x40:
+ case 0x60:
+ /* NV40 */
+ case 0x50:
+ case 0x80:
+ case 0x90:
+ /* G80 */
+ break;
+ default:
+ NOUVEAU_ERR("Unsupported chipset: NV%02x\n", nv->chipset);
+ return GL_FALSE;
+ }
+
driContextPriv->driverPrivate = (void *)nv;
nv->nv_screen = nv_screen;
nv->dri_screen = driScrnPriv;
@@ -176,10 +194,15 @@ nouveau_context_create(const __GLcontextModes *glVis,
}
}
- /*XXX: temporary - disable multi-context/single-channel on non-NV4x */
+ /*XXX: temporary - disable multi-context/single-channel on pre-NV4x */
switch (nv->chipset & 0xf0) {
case 0x40:
case 0x60:
+ /* NV40 class */
+ case 0x50:
+ case 0x80:
+ case 0x90:
+ /* G80 class */
break;
default:
nvc = NULL;
@@ -215,12 +238,17 @@ nouveau_context_create(const __GLcontextModes *glVis,
}
/* Create pipe */
- if (nv->chipset < 0x50)
- ret = nouveau_surface_init_nv04(nv);
- else
- ret = nouveau_surface_init_nv50(nv);
- if (ret) {
- return GL_FALSE;
+ switch (nv->chipset & 0xf0) {
+ case 0x50:
+ case 0x80:
+ case 0x90:
+ if (nouveau_surface_init_nv50(nv))
+ return GL_FALSE;
+ break;
+ default:
+ if (nouveau_surface_init_nv04(nv))
+ return GL_FALSE;
+ break;
}
if (!getenv("NOUVEAU_FORCE_SOFTPIPE")) {
diff --git a/src/gallium/winsys/dri/nouveau/nouveau_winsys.c b/src/gallium/winsys/dri/nouveau/nouveau_winsys.c
index dc7c4c3d71..64e84fb68e 100644
--- a/src/gallium/winsys/dri/nouveau/nouveau_winsys.c
+++ b/src/gallium/winsys/dri/nouveau/nouveau_winsys.c
@@ -93,6 +93,7 @@ nouveau_pipe_create(struct nouveau_context *nv)
break;
case 0x50:
case 0x80:
+ case 0x90:
hws_create = nv50_screen_create;
hw_create = nv50_create;
break;