From 66ff4e4ed471fdfa9ae4c49a0abcf5d5043ca65e Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 1 Jun 2022 20:46:03 +1000 Subject: [PATCH] drm/nouveau/fifo: rip out cevent, never used Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie --- drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 29 ---------------------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 1 - 4 files changed, 33 deletions(-) diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h index 64ee82c..4d1a3bd 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/fifo.h @@ -44,7 +44,6 @@ struct nvkm_fifo { struct mutex mutex; struct nvkm_event uevent; /* async user trigger */ - struct nvkm_event cevent; /* channel creation event */ struct nvkm_event kevent; /* channel killed */ }; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c index 2ed4ff0..58b8df7 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c @@ -144,30 +144,6 @@ nvkm_fifo_kevent_func = { .ctor = nvkm_fifo_kevent_ctor, }; -static int -nvkm_fifo_cevent_ctor(struct nvkm_object *object, void *data, u32 size, - struct nvkm_notify *notify) -{ - if (size == 0) { - notify->size = 0; - notify->types = 1; - notify->index = 0; - return 0; - } - return -ENOSYS; -} - -static const struct nvkm_event_func -nvkm_fifo_cevent_func = { - .ctor = nvkm_fifo_cevent_ctor, -}; - -void -nvkm_fifo_cevent(struct nvkm_fifo *fifo) -{ - nvkm_event_send(&fifo->cevent, 1, 0, NULL, 0); -} - static void nvkm_fifo_uevent_fini(struct nvkm_event *event, int type, int index) { @@ -332,7 +308,6 @@ nvkm_fifo_dtor(struct nvkm_engine *engine) if (fifo->func->dtor) data = fifo->func->dtor(fifo); nvkm_event_fini(&fifo->kevent); - nvkm_event_fini(&fifo->cevent); nvkm_event_fini(&fifo->uevent); mutex_destroy(&fifo->mutex); return data; @@ -378,9 +353,5 @@ nvkm_fifo_ctor(const struct nvkm_fifo_func *func, struct nvkm_device *device, return ret; } - ret = nvkm_event_init(&nvkm_fifo_cevent_func, 1, 1, &fifo->cevent); - if (ret) - return ret; - return nvkm_event_init(&nvkm_fifo_kevent_func, 1, nr, &fifo->kevent); } diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c index 8d95764..4ddaa91 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c @@ -424,7 +424,5 @@ nvkm_fifo_chan_ctor(const struct nvkm_fifo_chan_func *func, chan->addr = device->func->resource_addr(device, bar) + base + user * chan->chid; chan->size = user; - - nvkm_fifo_cevent(fifo); return 0; } diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h index 8992728..79cec57 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h @@ -7,7 +7,6 @@ int nvkm_fifo_ctor(const struct nvkm_fifo_func *, struct nvkm_device *, enum nvkm_subdev_type, int, int nr, struct nvkm_fifo *); void nvkm_fifo_uevent(struct nvkm_fifo *); -void nvkm_fifo_cevent(struct nvkm_fifo *); void nvkm_fifo_kevent(struct nvkm_fifo *, int chid); void nvkm_fifo_recover_chan(struct nvkm_fifo *, int chid); -- 2.7.4