Skip to content

Commit

Permalink
drm/nouveau: fix regression on original nv50 board
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ben Skeggs committed Oct 2, 2014
1 parent 5838ae6 commit f2f9a2c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_chan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f2f9a2c

Please sign in to comment.