aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-09-30 22:46:14 -0400
committerBen Skeggs <bskeggs@redhat.com>2014-10-01 23:32:24 -0400
commitf2f9a2cbaf019481feefe231f996d3602612fa99 (patch)
tree28c0826ea3b5bb0d8e5456f7f7ac3c85b243c800
parent5838ae610ff36777b8fce6f353c2417980c1a1fa (diff)
drm/nouveau: fix regression on original nv50 board
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>
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_chan.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c
index 99cd9e4a2aa6..3440fc999f2f 100644
--- a/drivers/gpu/drm/nouveau/nouveau_chan.c
+++ b/drivers/gpu/drm/nouveau/nouveau_chan.c
@@ -285,6 +285,7 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
285 struct nouveau_software_chan *swch; 285 struct nouveau_software_chan *swch;
286 struct nv_dma_v0 args = {}; 286 struct nv_dma_v0 args = {};
287 int ret, i; 287 int ret, i;
288 bool save;
288 289
289 nvif_object_map(chan->object); 290 nvif_object_map(chan->object);
290 291
@@ -386,7 +387,11 @@ nouveau_channel_init(struct nouveau_channel *chan, u32 vram, u32 gart)
386 } 387 }
387 388
388 /* initialise synchronisation */ 389 /* initialise synchronisation */
389 return nouveau_fence(chan->drm)->context_new(chan); 390 save = cli->base.super;
391 cli->base.super = true; /* hack until fencenv50 fixed */
392 ret = nouveau_fence(chan->drm)->context_new(chan);
393 cli->base.super = save;
394 return ret;
390} 395}
391 396
392int 397int