]>
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; | |
24e8375b | 20 | struct nouveau_vma *vma; |
0ad72863 | 21 | struct nvif_object ctxdma; |
24e8375b | 22 | u64 addr; |
ebb945a9 BS |
23 | } push; |
24 | ||
25 | /* TODO: this will be reworked in the near future */ | |
26 | bool accel_done; | |
27 | void *fence; | |
28 | struct { | |
29 | int max; | |
30 | int free; | |
31 | int cur; | |
32 | int put; | |
33 | int ib_base; | |
34 | int ib_max; | |
35 | int ib_free; | |
36 | int ib_put; | |
37 | } dma; | |
38 | u32 user_get_hi; | |
39 | u32 user_get; | |
40 | u32 user_put; | |
41 | ||
a01ca78c | 42 | struct nvif_object user; |
d8cc37d8 BS |
43 | |
44 | struct nvif_notify kill; | |
45 | atomic_t killed; | |
ebb945a9 BS |
46 | }; |
47 | ||
48 | ||
0ad72863 | 49 | int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *, |
fcf3f91c | 50 | u32 arg0, u32 arg1, struct nouveau_channel **); |
ebb945a9 BS |
51 | void nouveau_channel_del(struct nouveau_channel **); |
52 | int nouveau_channel_idle(struct nouveau_channel *); | |
53 | ||
703fa264 PM |
54 | extern int nouveau_vram_pushbuf; |
55 | ||
ebb945a9 | 56 | #endif |