From: Ben Skeggs Date: Tue, 29 Jan 2008 13:05:50 +0000 (+1100) Subject: nouveau: support nv67 X-Git-Tag: 062012170305~17580^2~496^2~298^2~16^2~399 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae7dcae81bc54bc16f16127f2fa1d01d9aa2332c;p=profile%2Fivi%2Fmesa.git nouveau: support nv67 --- diff --git a/src/mesa/drivers/dri/nouveau_winsys/nouveau_winsys.c b/src/mesa/drivers/dri/nouveau_winsys/nouveau_winsys.c index ddf3cba..8ffe89f 100644 --- a/src/mesa/drivers/dri/nouveau_winsys/nouveau_winsys.c +++ b/src/mesa/drivers/dri/nouveau_winsys/nouveau_winsys.c @@ -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: diff --git a/src/mesa/pipe/nv40/nv40_context.c b/src/mesa/pipe/nv40/nv40_context.c index f6fdd6b..d0d9583 100644 --- a/src/mesa/pipe/nv40/nv40_context.c +++ b/src/mesa/pipe/nv40/nv40_context.c @@ -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; }