提交 86b442d7 编写于 作者: B Ben Skeggs

drm/nouveau/fifo/gk104-: return channel instance in ctor args

Will be used to match fault buffer entries with a channel.
Signed-off-by: NBen Skeggs <bskeggs@redhat.com>
上级 302daab1
...@@ -10,6 +10,7 @@ struct kepler_channel_gpfifo_a_v0 { ...@@ -10,6 +10,7 @@ struct kepler_channel_gpfifo_a_v0 {
__u64 ioffset; __u64 ioffset;
__u64 runlist; __u64 runlist;
__u64 vmm; __u64 vmm;
__u64 inst;
}; };
#define NVA06F_V0_NTFY_NON_STALL_INTERRUPT 0x00 #define NVA06F_V0_NTFY_NON_STALL_INTERRUPT 0x00
......
...@@ -273,13 +273,15 @@ nouveau_channel_ind(struct nouveau_drm *drm, struct nvif_device *device, ...@@ -273,13 +273,15 @@ nouveau_channel_ind(struct nouveau_drm *drm, struct nvif_device *device,
ret = nvif_object_init(&device->object, 0, *oclass++, ret = nvif_object_init(&device->object, 0, *oclass++,
&args, size, &chan->user); &args, size, &chan->user);
if (ret == 0) { if (ret == 0) {
if (chan->user.oclass >= KEPLER_CHANNEL_GPFIFO_A) if (chan->user.oclass >= KEPLER_CHANNEL_GPFIFO_A) {
chan->chid = args.kepler.chid; chan->chid = args.kepler.chid;
else chan->inst = args.kepler.inst;
if (chan->user.oclass >= FERMI_CHANNEL_GPFIFO) } else
if (chan->user.oclass >= FERMI_CHANNEL_GPFIFO) {
chan->chid = args.fermi.chid; chan->chid = args.fermi.chid;
else } else {
chan->chid = args.nv50.chid; chan->chid = args.nv50.chid;
}
return ret; return ret;
} }
} while (*oclass); } while (*oclass);
......
...@@ -10,6 +10,7 @@ struct nouveau_channel { ...@@ -10,6 +10,7 @@ struct nouveau_channel {
struct nouveau_drm *drm; struct nouveau_drm *drm;
int chid; int chid;
u64 inst;
struct nvif_object vram; struct nvif_object vram;
struct nvif_object gart; struct nvif_object gart;
......
...@@ -240,7 +240,7 @@ gk104_fifo_gpfifo_func = { ...@@ -240,7 +240,7 @@ gk104_fifo_gpfifo_func = {
static int static int
gk104_fifo_gpfifo_new_(struct gk104_fifo *fifo, u64 *runlists, u16 *chid, gk104_fifo_gpfifo_new_(struct gk104_fifo *fifo, u64 *runlists, u16 *chid,
u64 vmm, u64 ioffset, u64 ilength, u64 vmm, u64 ioffset, u64 ilength, u64 *inst,
const struct nvkm_oclass *oclass, const struct nvkm_oclass *oclass,
struct nvkm_object **pobject) struct nvkm_object **pobject)
{ {
...@@ -279,6 +279,7 @@ gk104_fifo_gpfifo_new_(struct gk104_fifo *fifo, u64 *runlists, u16 *chid, ...@@ -279,6 +279,7 @@ gk104_fifo_gpfifo_new_(struct gk104_fifo *fifo, u64 *runlists, u16 *chid,
return ret; return ret;
*chid = chan->base.chid; *chid = chan->base.chid;
*inst = chan->base.inst->addr;
/* Hack to support GPUs where even individual channels should be /* Hack to support GPUs where even individual channels should be
* part of a channel group. * part of a channel group.
...@@ -346,6 +347,7 @@ gk104_fifo_gpfifo_new(struct gk104_fifo *fifo, const struct nvkm_oclass *oclass, ...@@ -346,6 +347,7 @@ gk104_fifo_gpfifo_new(struct gk104_fifo *fifo, const struct nvkm_oclass *oclass,
args->v0.vmm, args->v0.vmm,
args->v0.ioffset, args->v0.ioffset,
args->v0.ilength, args->v0.ilength,
&args->v0.inst,
oclass, pobject); oclass, pobject);
} }
......
...@@ -114,7 +114,7 @@ gv100_fifo_gpfifo_func = { ...@@ -114,7 +114,7 @@ gv100_fifo_gpfifo_func = {
static int static int
gv100_fifo_gpfifo_new_(struct gk104_fifo *fifo, u64 *runlists, u16 *chid, gv100_fifo_gpfifo_new_(struct gk104_fifo *fifo, u64 *runlists, u16 *chid,
u64 vmm, u64 ioffset, u64 ilength, u64 vmm, u64 ioffset, u64 ilength, u64 *inst,
const struct nvkm_oclass *oclass, const struct nvkm_oclass *oclass,
struct nvkm_object **pobject) struct nvkm_object **pobject)
{ {
...@@ -150,6 +150,7 @@ gv100_fifo_gpfifo_new_(struct gk104_fifo *fifo, u64 *runlists, u16 *chid, ...@@ -150,6 +150,7 @@ gv100_fifo_gpfifo_new_(struct gk104_fifo *fifo, u64 *runlists, u16 *chid,
return ret; return ret;
*chid = chan->base.chid; *chid = chan->base.chid;
*inst = chan->base.inst->addr;
/* Hack to support GPUs where even individual channels should be /* Hack to support GPUs where even individual channels should be
* part of a channel group. * part of a channel group.
...@@ -218,6 +219,7 @@ gv100_fifo_gpfifo_new(struct gk104_fifo *fifo, const struct nvkm_oclass *oclass, ...@@ -218,6 +219,7 @@ gv100_fifo_gpfifo_new(struct gk104_fifo *fifo, const struct nvkm_oclass *oclass,
args->v0.vmm, args->v0.vmm,
args->v0.ioffset, args->v0.ioffset,
args->v0.ilength, args->v0.ilength,
&args->v0.inst,
oclass, pobject); oclass, pobject);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册