drm/nouveau: fix regression on original nv50 board
authorBen Skeggs <bskeggs@redhat.com>
Wed, 1 Oct 2014 02:46:14 +0000 (12:46 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 2 Oct 2014 03:32:24 +0000 (13:32 +1000)
Xorg (and any non-DRM client really) doesn't have permission to directly
touch VRAM on nv50 and up, which the fence code prior to g84 depends on.

It's less invasive to temporarily grant it premission to do so, as it
previously did, than it is to rework fencenv50 to use the VM.  That
will come later on.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_chan.c

index 99cd9e4a2aa6efde5c4c94154070cf593f552fb3..3440fc999f2f3290b3557ea495a26afb65fda874 100644 (file)
@@ -285,6 +285,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
        struct nouveau_software_chan *swch;
        struct nv_dma_v0 args = {};
        int ret, i;
+       bool save;
 
        nvif_object_map(chan->object);
 
@@ -386,7 +387,11 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
        }
 
        /* initialise synchronisation */
-       return nouveau_fence(chan->drm)->context_new(chan);
+       save = cli->base.super;
+       cli->base.super = true; /* hack until fencenv50 fixed */
+       ret = nouveau_fence(chan->drm)->context_new(chan);
+       cli->base.super = save;
+       return ret;
 }
 
 int
This page took 0.028614 seconds and 5 git commands to generate.