summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_chan.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-08-20 07:54:16 +0300
committerBen Skeggs <bskeggs@redhat.com>2015-08-28 05:40:33 +0300
commit159045cdc460794df27e2cc624a9641be5c54b23 (patch)
tree8ba746b0bc4915e9dcee5c2253c443b03680b491 /drivers/gpu/drm/nouveau/nouveau_chan.c
parent22827fa42b0baa9287ea56691f26dc45fecea049 (diff)
downloadlinux-159045cdc460794df27e2cc624a9641be5c54b23.tar.xz
drm/nouveau/nvif: replace pushbuf with vm in fermi/kepler gpfifo class args
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_chan.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_chan.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_chan.c b/drivers/gpu/drm/nouveau/nouveau_chan.c
index 65a144f8d3a7..7f3e821e235d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_chan.c
+++ b/drivers/gpu/drm/nouveau/nouveau_chan.c
@@ -193,6 +193,7 @@ nouveau_channel_ind(struct nouveau_drm *drm, struct nvif_device *device,
const u16 *oclass = oclasses;
union {
struct nv50_channel_gpfifo_v0 nv50;
+ struct fermi_channel_gpfifo_v0 fermi;
struct kepler_channel_gpfifo_a_v0 kepler;
} args;
struct nouveau_channel *chan;
@@ -210,15 +211,23 @@ nouveau_channel_ind(struct nouveau_drm *drm, struct nvif_device *device,
if (oclass[0] >= KEPLER_CHANNEL_GPFIFO_A) {
args.kepler.version = 0;
args.kepler.engine = engine;
- args.kepler.pushbuf = nvif_handle(&chan->push.ctxdma);
args.kepler.ilength = 0x02000;
args.kepler.ioffset = 0x10000 + chan->push.vma.offset;
+ args.kepler.vm = 0;
size = sizeof(args.kepler);
+ } else
+ if (oclass[0] >= FERMI_CHANNEL_GPFIFO) {
+ args.fermi.version = 0;
+ args.fermi.ilength = 0x02000;
+ args.fermi.ioffset = 0x10000 + chan->push.vma.offset;
+ args.fermi.vm = 0;
+ size = sizeof(args.fermi);
} else {
args.nv50.version = 0;
- args.nv50.pushbuf = nvif_handle(&chan->push.ctxdma);
args.nv50.ilength = 0x02000;
args.nv50.ioffset = 0x10000 + chan->push.vma.offset;
+ args.nv50.pushbuf = nvif_handle(&chan->push.ctxdma);
+ args.nv50.vm = 0;
size = sizeof(args.nv50);
}
@@ -228,6 +237,9 @@ nouveau_channel_ind(struct nouveau_drm *drm, struct nvif_device *device,
if (chan->user.oclass >= KEPLER_CHANNEL_GPFIFO_A)
chan->chid = args.kepler.chid;
else
+ if (chan->user.oclass >= FERMI_CHANNEL_GPFIFO)
+ chan->chid = args.fermi.chid;
+ else
chan->chid = args.nv50.chid;
return ret;
}