nouveau: support nv67
authorBen Skeggs <skeggsb@gmail.com>
Tue, 29 Jan 2008 13:05:50 +0000 (00:05 +1100)
committerBen Skeggs <skeggsb@gmail.com>
Tue, 29 Jan 2008 13:05:59 +0000 (00:05 +1100)
src/mesa/drivers/dri/nouveau_winsys/nouveau_winsys.c
src/mesa/pipe/nv40/nv40_context.c

index ddf3cba..8ffe89f 100644 (file)
@@ -81,6 +81,7 @@ nouveau_pipe_create(struct nouveau_context *nv)
 
        switch (nv->chipset & 0xf0) {
        case 0x40:
+       case 0x60:
                hw_create = nv40_create;
                break;
        case 0x50:
index f6fdd6b..d0d9583 100644 (file)
@@ -188,26 +188,34 @@ nv40_init_hwctx(struct nv40_context *nv40, int curie_class)
        return TRUE;
 }
 
-#define GRCLASS4097_CHIPSETS 0x00000baf
-#define GRCLASS4497_CHIPSETS 0x00005450
+#define NV4X_GRCLASS4097_CHIPSETS 0x00000baf
+#define NV4X_GRCLASS4497_CHIPSETS 0x00005450
+#define NV6X_GRCLASS4497_CHIPSETS 0x00000080
+
 struct pipe_context *
 nv40_create(struct pipe_winsys *pipe_winsys, struct nouveau_winsys *nvws,
            unsigned chipset)
 {
        struct nv40_context *nv40;
-       int curie_class, ret;
-
-       if ((chipset & 0xf0) != 0x40) {
-               NOUVEAU_ERR("Not a NV4X chipset\n");
-               return NULL;
+       int curie_class = 0, ret;
+
+       switch (chipset & 0xf0) {
+       case 0x40:
+               if (NV4X_GRCLASS4097_CHIPSETS & (1 << (chipset & 0x0f)))
+                       curie_class = NV40TCL;
+               else
+               if (NV4X_GRCLASS4497_CHIPSETS & (1 << (chipset & 0x0f)))
+                       curie_class = NV44TCL;
+               break;
+       case 0x60:
+               if (NV6X_GRCLASS4497_CHIPSETS & (1 << (chipset & 0x0f)))
+                       curie_class = NV44TCL;
+               break;
+       default:
+               break;
        }
 
-       if (GRCLASS4097_CHIPSETS & (1 << (chipset & 0x0f))) {
-               curie_class = NV40TCL;
-       } else
-       if (GRCLASS4497_CHIPSETS & (1 << (chipset & 0x0f))) {
-               curie_class = NV44TCL;
-       } else {
+       if (!curie_class) {
                NOUVEAU_ERR("Unknown NV4x chipset: NV%02x\n", chipset);
                return NULL;
        }