Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
ebb945a9 BS |
2 | #ifndef __NOUVEAU_CHAN_H__ |
3 | #define __NOUVEAU_CHAN_H__ | |
0ad72863 | 4 | #include <nvif/object.h> |
d8cc37d8 | 5 | #include <nvif/notify.h> |
0ad72863 | 6 | struct nvif_device; |
ebb945a9 BS |
7 | |
8 | struct nouveau_channel { | |
0ad72863 | 9 | struct nvif_device *device; |
ebb945a9 BS |
10 | struct nouveau_drm *drm; |
11 | ||
bbf8906b BS |
12 | int chid; |
13 | ||
0ad72863 BS |
14 | struct nvif_object vram; |
15 | struct nvif_object gart; | |
16 | struct nvif_object nvsw; | |
ebb945a9 BS |
17 | |
18 | struct { | |
19 | struct nouveau_bo *buffer; | |
be83cd4e | 20 | struct nvkm_vma vma; |
0ad72863 | 21 | struct nvif_object ctxdma; |
ebb945a9 BS |
22 | } push; |
23 | ||
24 | /* TODO: this will be reworked in the near future */ | |
25 | bool accel_done; | |
26 | void *fence; | |
27 | struct { | |
28 | int max; | |
29 | int free; | |
30 | int cur; | |
31 | int put; | |
32 | int ib_base; | |
33 | int ib_max; | |
34 | int ib_free; | |
35 | int ib_put; | |
36 | } dma; | |
37 | u32 user_get_hi; | |
38 | u32 user_get; | |
39 | u32 user_put; | |
40 | ||
a01ca78c | 41 | struct nvif_object user; |
d8cc37d8 BS |
42 | |
43 | struct nvif_notify kill; | |
44 | atomic_t killed; | |
ebb945a9 BS |
45 | }; |
46 | ||
47 | ||
0ad72863 | 48 | int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *, |
fcf3f91c | 49 | u32 arg0, u32 arg1, struct nouveau_channel **); |
ebb945a9 BS |
50 | void nouveau_channel_del(struct nouveau_channel **); |
51 | int nouveau_channel_idle(struct nouveau_channel *); | |
52 | ||
703fa264 PM |
53 | extern int nouveau_vram_pushbuf; |
54 | ||
ebb945a9 | 55 | #endif |