#include <subdev/fb.h>
#include <subdev/mmu.h>
#include <subdev/timer.h>
+#include <engine/sw.h>
#include <nvif/class.h>
#include <nvif/ioctl.h>
schedule_work(&fifo->fault);
}
-static int
-gf100_fifo_swmthd(struct gf100_fifo *fifo, u32 chid, u32 mthd, u32 data)
-{
- struct gf100_fifo_chan *chan = NULL;
- struct nvkm_handle *bind;
- unsigned long flags;
- int ret = -EINVAL;
-
- spin_lock_irqsave(&fifo->base.lock, flags);
- if (likely(chid >= fifo->base.min && chid <= fifo->base.max))
- chan = (void *)fifo->base.channel[chid];
- if (unlikely(!chan))
- goto out;
-
- bind = nvkm_namedb_get_class(nv_namedb(chan), NVIF_IOCTL_NEW_V0_SW_GF100);
- if (likely(bind)) {
- if (!mthd || !nv_call(bind->object, mthd, data))
- ret = 0;
- nvkm_namedb_put(bind);
- }
-
-out:
- spin_unlock_irqrestore(&fifo->base.lock, flags);
- return ret;
-}
-
static const struct nvkm_enum
gf100_fifo_sched_reason[] = {
{ 0x0a, "CTXSW_TIMEOUT" },
char msg[128];
if (stat & 0x00800000) {
- if (!gf100_fifo_swmthd(fifo, chid, mthd, data))
- show &= ~0x00800000;
+ if (device->sw) {
+ if (nvkm_sw_mthd(device->sw, chid, subc, mthd, data))
+ show &= ~0x00800000;
+ }
}
if (show) {