summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv20/nv20_screen.c
diff options
context:
space:
mode:
authorPekka Paalanen <pq@iki.fi>2008-12-07 01:05:54 +0200
committerPekka Paalanen <pq@iki.fi>2008-12-07 22:33:02 +0200
commitbcd5dda4358a5e47551278477bd00d2c63415c44 (patch)
treef37c36fa370a14039244b1fc711cb8ac54d99e3d /src/gallium/drivers/nv20/nv20_screen.c
parent54a6dcb70fb3c1ac7e9d2d4449db13197637a020 (diff)
nouveau: make nv20 use NV{20,25}TCL objects
Up till now, nv20 driver has been using NV10TCL, and being really an nv10 driver. That has changed. Signed-off-by: Pekka Paalanen <pq@iki.fi>
Diffstat (limited to 'src/gallium/drivers/nv20/nv20_screen.c')
-rw-r--r--src/gallium/drivers/nv20/nv20_screen.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/src/gallium/drivers/nv20/nv20_screen.c b/src/gallium/drivers/nv20/nv20_screen.c
index b7f5ea8512..c0a90f6c58 100644
--- a/src/gallium/drivers/nv20/nv20_screen.c
+++ b/src/gallium/drivers/nv20/nv20_screen.c
@@ -151,7 +151,7 @@ struct pipe_screen *
nv20_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
{
struct nv20_screen *screen = CALLOC_STRUCT(nv20_screen);
- unsigned celsius_class;
+ unsigned kelvin_class = 0;
unsigned chipset = nvws->channel->device->chipset;
int ret;
@@ -160,21 +160,17 @@ nv20_screen_create(struct pipe_winsys *ws, struct nouveau_winsys *nvws)
screen->nvws = nvws;
/* 3D object */
- if (chipset>=0x20)
- celsius_class=NV11TCL;
- else if (chipset>=0x17)
- celsius_class=NV17TCL;
- else if (chipset>=0x11)
- celsius_class=NV11TCL;
- else
- celsius_class=NV10TCL;
-
- if (!celsius_class) {
- NOUVEAU_ERR("Unknown nv1x chipset: nv%02x\n", chipset);
+ if (chipset >= 0x25)
+ kelvin_class = NV25TCL;
+ else if (chipset >= 0x20)
+ kelvin_class = NV20TCL;
+
+ if (!kelvin_class || chipset >= 0x30) {
+ NOUVEAU_ERR("Unknown nv2x chipset: nv%02x\n", chipset);
return NULL;
}
- ret = nvws->grobj_alloc(nvws, celsius_class, &screen->kelvin);
+ ret = nvws->grobj_alloc(nvws, kelvin_class, &screen->kelvin);
if (ret) {
NOUVEAU_ERR("Error creating 3D object: %d\n", ret);
return FALSE;