diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 04:54:18 (GMT) |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-28 02:40:38 (GMT) |
commit | 35acf3d72cf273e164c9a8bbf30610b95e2a4c84 (patch) | |
tree | 30146a31f9fe67ea7d52d5fa783a554870de4705 /drivers | |
parent | a83d8872fc8a482e47f7375ab66006e1f8c1fd59 (diff) | |
download | linux-35acf3d72cf273e164c9a8bbf30610b95e2a4c84.tar.xz |
drm/nouveau/cipher: remove dependence on namedb/engctx lookup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c b/drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c index 6789229..62cdd1e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c @@ -106,33 +106,29 @@ g84_cipher_intr_mask[] = { static void g84_cipher_intr(struct nvkm_subdev *subdev) { - struct nvkm_fifo *fifo = nvkm_fifo(subdev); - struct nvkm_engine *engine = nv_engine(subdev); - struct nvkm_object *engctx; struct nvkm_engine *cipher = (void *)subdev; struct nvkm_device *device = cipher->subdev.device; + struct nvkm_fifo *fifo = device->fifo; + struct nvkm_fifo_chan *chan; u32 stat = nvkm_rd32(device, 0x102130); u32 mthd = nvkm_rd32(device, 0x102190); u32 data = nvkm_rd32(device, 0x102194); u32 inst = nvkm_rd32(device, 0x102188) & 0x7fffffff; + unsigned long flags; char msg[128]; - int chid; - - engctx = nvkm_engctx_get(engine, inst); - chid = fifo->chid(fifo, engctx); + chan = nvkm_fifo_chan_inst(fifo, (u64)inst << 12, &flags); if (stat) { nvkm_snprintbf(msg, sizeof(msg), g84_cipher_intr_mask, stat); nvkm_error(subdev, "%08x [%s] ch %d [%010llx %s] " "mthd %04x data %08x\n", - stat, msg, chid, (u64)inst << 12, - nvkm_client_name(engctx), mthd, data); + stat, msg, chan ? chan->chid : -1, (u64)inst << 12, + nvkm_client_name(chan), mthd, data); } + nvkm_fifo_chan_put(fifo, flags, &chan); nvkm_wr32(device, 0x102130, stat); nvkm_wr32(device, 0x10200c, 0x10); - - nvkm_engctx_put(engctx); } static int |