posix-clock: Fix return code on the poll method's error path
[linux/fpc-iii.git] / drivers / gpu / drm / nouveau / nvkm / engine / fifo / chan.h
blob55dc415c5c08b2373ab566b8caec1b218a2476bf
1 #ifndef __NVKM_FIFO_CHAN_H__
2 #define __NVKM_FIFO_CHAN_H__
3 #define nvkm_fifo_chan(p) container_of((p), struct nvkm_fifo_chan, object)
4 #include "priv.h"
6 struct nvkm_fifo_chan_func {
7 void *(*dtor)(struct nvkm_fifo_chan *);
8 void (*init)(struct nvkm_fifo_chan *);
9 void (*fini)(struct nvkm_fifo_chan *);
10 int (*ntfy)(struct nvkm_fifo_chan *, u32 type, struct nvkm_event **);
11 int (*engine_ctor)(struct nvkm_fifo_chan *, struct nvkm_engine *,
12 struct nvkm_object *);
13 void (*engine_dtor)(struct nvkm_fifo_chan *, struct nvkm_engine *);
14 int (*engine_init)(struct nvkm_fifo_chan *, struct nvkm_engine *);
15 int (*engine_fini)(struct nvkm_fifo_chan *, struct nvkm_engine *,
16 bool suspend);
17 int (*object_ctor)(struct nvkm_fifo_chan *, struct nvkm_object *);
18 void (*object_dtor)(struct nvkm_fifo_chan *, int);
21 int nvkm_fifo_chan_ctor(const struct nvkm_fifo_chan_func *, struct nvkm_fifo *,
22 u32 size, u32 align, bool zero, u64 vm, u64 push,
23 u64 engines, int bar, u32 base, u32 user,
24 const struct nvkm_oclass *, struct nvkm_fifo_chan *);
26 struct nvkm_fifo_chan_oclass {
27 int (*ctor)(struct nvkm_fifo *, const struct nvkm_oclass *,
28 void *data, u32 size, struct nvkm_object **);
29 struct nvkm_sclass base;
32 int g84_fifo_chan_ntfy(struct nvkm_fifo_chan *, u32, struct nvkm_event **);
33 #endif