Commit 21e6de29 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/fifo: add an api for initiating channel recovery

This will be used by callers outside of fifo interrupt handlers.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 13416077
...@@ -31,6 +31,17 @@ ...@@ -31,6 +31,17 @@
#include <nvif/event.h> #include <nvif/event.h>
#include <nvif/unpack.h> #include <nvif/unpack.h>
void
nvkm_fifo_recover_chan(struct nvkm_fifo *fifo, int chid)
{
unsigned long flags;
if (WARN_ON(!fifo->func->recover_chan))
return;
spin_lock_irqsave(&fifo->lock, flags);
fifo->func->recover_chan(fifo, chid);
spin_unlock_irqrestore(&fifo->lock, flags);
}
void void
nvkm_fifo_pause(struct nvkm_fifo *fifo, unsigned long *flags) nvkm_fifo_pause(struct nvkm_fifo *fifo, unsigned long *flags)
{ {
......
...@@ -8,6 +8,7 @@ int nvkm_fifo_ctor(const struct nvkm_fifo_func *, struct nvkm_device *, ...@@ -8,6 +8,7 @@ int nvkm_fifo_ctor(const struct nvkm_fifo_func *, struct nvkm_device *,
void nvkm_fifo_uevent(struct nvkm_fifo *); void nvkm_fifo_uevent(struct nvkm_fifo *);
void nvkm_fifo_cevent(struct nvkm_fifo *); void nvkm_fifo_cevent(struct nvkm_fifo *);
void nvkm_fifo_kevent(struct nvkm_fifo *, int chid); void nvkm_fifo_kevent(struct nvkm_fifo *, int chid);
void nvkm_fifo_recover_chan(struct nvkm_fifo *, int chid);
struct nvkm_fifo_chan_oclass; struct nvkm_fifo_chan_oclass;
struct nvkm_fifo_func { struct nvkm_fifo_func {
...@@ -20,6 +21,7 @@ struct nvkm_fifo_func { ...@@ -20,6 +21,7 @@ struct nvkm_fifo_func {
void (*start)(struct nvkm_fifo *, unsigned long *); void (*start)(struct nvkm_fifo *, unsigned long *);
void (*uevent_init)(struct nvkm_fifo *); void (*uevent_init)(struct nvkm_fifo *);
void (*uevent_fini)(struct nvkm_fifo *); void (*uevent_fini)(struct nvkm_fifo *);
void (*recover_chan)(struct nvkm_fifo *, int chid);
int (*class_get)(struct nvkm_fifo *, int index, int (*class_get)(struct nvkm_fifo *, int index,
const struct nvkm_fifo_chan_oclass **); const struct nvkm_fifo_chan_oclass **);
const struct nvkm_fifo_chan_oclass *chan[]; const struct nvkm_fifo_chan_oclass *chan[];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment