diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2021-02-09 04:06:35 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2021-02-11 02:49:57 +0100 |
commit | 496162037cd24191e2aec659cff40e267fcc6193 (patch) | |
tree | 55b9487b79b0bf521a7c187006dea30d9a73e54b /drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | |
parent | drm/nouveau/fifo: index backend engctx by engine id (diff) | |
download | linux-496162037cd24191e2aec659cff40e267fcc6193.tar.xz linux-496162037cd24191e2aec659cff40e267fcc6193.zip |
drm/nouveau/fifo: add id_engine hook
Will be used by common code in subsequent commits to lookup driver
engine state from HW engine ID.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index a8ddb1b09e6d..c9efa6ae6466 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -258,6 +258,12 @@ gk104_fifo_pbdma = { .init = gk104_fifo_pbdma_init, }; +struct nvkm_engine * +gk104_fifo_id_engine(struct nvkm_fifo *base, int engi) +{ + return gk104_fifo(base)->engine[engi].engine; +} + int gk104_fifo_engine_id(struct nvkm_fifo *base, struct nvkm_engine *engine) { @@ -1037,6 +1043,7 @@ gk104_fifo_ = { .intr = gk104_fifo_intr, .fault = gk104_fifo_fault, .engine_id = gk104_fifo_engine_id, + .id_engine = gk104_fifo_id_engine, .uevent_init = gk104_fifo_uevent_init, .uevent_fini = gk104_fifo_uevent_fini, .recover_chan = gk104_fifo_recover_chan, |