diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2022-06-01 20:46:05 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2022-07-13 13:57:11 +1000 |
commit | ea0b20d3bd96f9ce2a1e9d886175411c05dcb179 (patch) | |
tree | 37b236256e44f111a751e8c1a82130223cf80927 | |
parent | 7ba01b504c16ae64a8faa5f5ee9a809d424cdf0e (diff) | |
download | linux-ea0b20d3bd96f9ce2a1e9d886175411c05dcb179.tar.bz2 |
drm/nouveau/flcn: remove unused functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/falcon/v1.c | 25 |
3 files changed, 0 insertions, 45 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h index 306125d17ece..b593407b9e36 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h @@ -4,7 +4,6 @@ #define nvkm_falcon(p) container_of((p), struct nvkm_falcon, engine) #include <core/engine.h> struct nvkm_fifo_chan; -struct nvkm_gpuobj; enum nvkm_falcon_dmaidx { FALCON_DMAIDX_UCODE = 0, @@ -51,15 +50,6 @@ struct nvkm_falcon { struct nvkm_engine engine; }; -/* This constructor must be called from the owner's oneinit() hook and - * *not* its constructor. This is to ensure that DEVINIT has been - * completed, and that the device is correctly enabled before we touch - * falcon registers. - */ -int nvkm_falcon_v1_new(struct nvkm_subdev *owner, const char *name, u32 addr, - struct nvkm_falcon **); - -void nvkm_falcon_del(struct nvkm_falcon **); int nvkm_falcon_get(struct nvkm_falcon *, const struct nvkm_subdev *); void nvkm_falcon_put(struct nvkm_falcon *, const struct nvkm_subdev *); diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/base.c b/drivers/gpu/drm/nouveau/nvkm/falcon/base.c index c91130a6be2a..f3f90c1063dd 100644 --- a/drivers/gpu/drm/nouveau/nvkm/falcon/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/falcon/base.c @@ -221,13 +221,3 @@ nvkm_falcon_ctor(const struct nvkm_falcon_func *func, mutex_init(&falcon->dmem_mutex); return 0; } - -void -nvkm_falcon_del(struct nvkm_falcon **pfalcon) -{ - if (*pfalcon) { - nvkm_falcon_dtor(*pfalcon); - kfree(*pfalcon); - *pfalcon = NULL; - } -} diff --git a/drivers/gpu/drm/nouveau/nvkm/falcon/v1.c b/drivers/gpu/drm/nouveau/nvkm/falcon/v1.c index 1ff9b9c2e651..b0ee4c31414c 100644 --- a/drivers/gpu/drm/nouveau/nvkm/falcon/v1.c +++ b/drivers/gpu/drm/nouveau/nvkm/falcon/v1.c @@ -309,28 +309,3 @@ nvkm_falcon_v1_disable(struct nvkm_falcon *falcon) nvkm_falcon_wr32(falcon, 0x014, 0xff); falcon_v1_wait_idle(falcon); } - -static const struct nvkm_falcon_func -nvkm_falcon_v1 = { - .load_imem = nvkm_falcon_v1_load_imem, - .load_dmem = nvkm_falcon_v1_load_dmem, - .read_dmem = nvkm_falcon_v1_read_dmem, - .bind_context = nvkm_falcon_v1_bind_context, - .start = nvkm_falcon_v1_start, - .wait_for_halt = nvkm_falcon_v1_wait_for_halt, - .clear_interrupt = nvkm_falcon_v1_clear_interrupt, - .enable = nvkm_falcon_v1_enable, - .disable = nvkm_falcon_v1_disable, - .set_start_addr = nvkm_falcon_v1_set_start_addr, -}; - -int -nvkm_falcon_v1_new(struct nvkm_subdev *owner, const char *name, u32 addr, - struct nvkm_falcon **pfalcon) -{ - struct nvkm_falcon *falcon; - if (!(falcon = *pfalcon = kzalloc(sizeof(*falcon), GFP_KERNEL))) - return -ENOMEM; - nvkm_falcon_ctor(&nvkm_falcon_v1, owner, name, addr, falcon); - return 0; -} |