1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __NVKM_FIFO_CHAN_H__
3 #define __NVKM_FIFO_CHAN_H__
4 #define nvkm_fifo_chan(p) container_of((p), struct nvkm_fifo_chan, object)
7 struct nvkm_fifo_chan_func
{
8 void *(*dtor
)(struct nvkm_fifo_chan
*);
9 void (*init
)(struct nvkm_fifo_chan
*);
10 void (*fini
)(struct nvkm_fifo_chan
*);
11 int (*ntfy
)(struct nvkm_fifo_chan
*, u32 type
, struct nvkm_event
**);
12 int (*engine_ctor
)(struct nvkm_fifo_chan
*, struct nvkm_engine
*,
13 struct nvkm_object
*);
14 void (*engine_dtor
)(struct nvkm_fifo_chan
*, struct nvkm_engine
*);
15 int (*engine_init
)(struct nvkm_fifo_chan
*, struct nvkm_engine
*);
16 int (*engine_fini
)(struct nvkm_fifo_chan
*, struct nvkm_engine
*,
18 int (*object_ctor
)(struct nvkm_fifo_chan
*, struct nvkm_object
*);
19 void (*object_dtor
)(struct nvkm_fifo_chan
*, int);
22 int nvkm_fifo_chan_ctor(const struct nvkm_fifo_chan_func
*, struct nvkm_fifo
*,
23 u32 size
, u32 align
, bool zero
, u64 vm
, u64 push
,
24 u64 engines
, int bar
, u32 base
, u32 user
,
25 const struct nvkm_oclass
*, struct nvkm_fifo_chan
*);
27 struct nvkm_fifo_chan_oclass
{
28 int (*ctor
)(struct nvkm_fifo
*, const struct nvkm_oclass
*,
29 void *data
, u32 size
, struct nvkm_object
**);
30 struct nvkm_sclass base
;
33 int gf100_fifo_chan_ntfy(struct nvkm_fifo_chan
*, u32
, struct nvkm_event
**);