aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h
blob: c66f5370b21f163ac68378461a02093c04520ed8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* SPDX-License-Identifier: MIT */
#ifndef __NVKM_FIFO_PRIV_H__
#define __NVKM_FIFO_PRIV_H__
#define nvkm_fifo(p) container_of((p), struct nvkm_fifo, engine)
#include <engine/fifo.h>

int nvkm_fifo_ctor(const struct nvkm_fifo_func *, struct nvkm_device *,
		   int index, 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);

struct nvkm_fifo_chan *
nvkm_fifo_chan_inst_locked(struct nvkm_fifo *, u64 inst);

struct nvkm_fifo_chan_oclass;
struct nvkm_fifo_func {
	void *(*dtor)(struct nvkm_fifo *);
	int (*oneinit)(struct nvkm_fifo *);
	int (*info)(struct nvkm_fifo *, u64 mthd, u64 *data);
	void (*init)(struct nvkm_fifo *);
	void (*fini)(struct nvkm_fifo *);
	void (*intr)(struct nvkm_fifo *);
	void (*fault)(struct nvkm_fifo *, struct nvkm_fault_data *);
	void (*pause)(struct nvkm_fifo *, unsigned long *);
	void (*start)(struct nvkm_fifo *, unsigned long *);
	void (*uevent_init)(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, struct nvkm_oclass *);
	int (*class_new)(struct nvkm_fifo *, const struct nvkm_oclass *,
			 void *, u32, struct nvkm_object **);
	const struct nvkm_fifo_chan_oclass *chan[];
};

void nv04_fifo_intr(struct nvkm_fifo *);
void nv04_fifo_pause(struct nvkm_fifo *, unsigned long *);
void nv04_fifo_start(struct nvkm_fifo *, unsigned long *);
#endif