drm/nv50: let the card handle the initial context switch
authorBen Skeggs <skeggsb@gmail.com>
Mon, 9 Feb 2009 22:57:21 +0000 (08:57 +1000)
committerBen Skeggs <skeggsb@gmail.com>
Mon, 9 Feb 2009 23:11:27 +0000 (09:11 +1000)
Our PFIFO/PGRAPH context save/load functions don't really work well
(at all?) on nv5x yet.  Depending on what random state the card is
in before the drm loads, fbcon probably won't work correctly.

Luckily we've setup the GPU in such a way that it'll actually do a
hw context switch for the first context.  Not sure of how successful
this'd be currently on the older chips (actually, pretty sure it won't
work), so NV50 only for now.

shared-core/nouveau_fifo.c

index 92ea8fc..114ed29 100644 (file)
@@ -362,7 +362,8 @@ nouveau_fifo_alloc(struct drm_device *dev, struct nouveau_channel **chan_ret,
        /* If this is the first channel, setup PFIFO ourselves.  For any
         * other case, the GPU will handle this when it switches contexts.
         */
-       if (dev_priv->fifo_alloc_count == 1) {
+       if (dev_priv->card_type < NV_50 &&
+           dev_priv->fifo_alloc_count == 1) {
                ret = engine->fifo.load_context(chan);
                if (ret) {
                        nouveau_fifo_free(chan);