diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2009-02-15 22:06:18 +1000 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2009-02-15 22:06:18 +1000 |
commit | 084e143d0c82f5bf6e4ccc8c84a01307c820ca93 (patch) | |
tree | 38770bf1e0fc905539ed233a22d43bd6ca885abb /shared-core | |
parent | a4ac60a10239bb6d19f6d89f2c044e9b7b29837c (diff) |
nv40: fail completely if we don't have a ctxprog for the chipset
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/nv40_graph.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/shared-core/nv40_graph.c b/shared-core/nv40_graph.c index de178f57..4c378a05 100644 --- a/shared-core/nv40_graph.c +++ b/shared-core/nv40_graph.c @@ -1982,20 +1982,17 @@ nv40_graph_init(struct drm_device *dev) default: DRM_ERROR("Context program for 0x%02x unavailable\n", dev_priv->chipset); - ctx_prog = NULL; - break; + return -EINVAL; } /* Load the context program onto the card */ - if (ctx_prog) { - DRM_DEBUG("Loading context program\n"); - i = 0; - - NV_WRITE(NV40_PGRAPH_CTXCTL_UCODE_INDEX, 0); - while (ctx_prog[i] != ~0) { - NV_WRITE(NV40_PGRAPH_CTXCTL_UCODE_DATA, ctx_prog[i]); - i++; - } + DRM_DEBUG("Loading context program\n"); + + i = 0; + NV_WRITE(NV40_PGRAPH_CTXCTL_UCODE_INDEX, 0); + while (ctx_prog[i] != ~0) { + NV_WRITE(NV40_PGRAPH_CTXCTL_UCODE_DATA, ctx_prog[i]); + i++; } /* No context present currently */ |