Loading...
1#ifndef __NOUVEAU_CHAN_H__
2#define __NOUVEAU_CHAN_H__
3
4#include <nvif/object.h>
5struct nvif_device;
6
7struct nouveau_channel {
8 struct nvif_device *device;
9 struct nouveau_drm *drm;
10
11 int chid;
12
13 struct nvif_object vram;
14 struct nvif_object gart;
15 struct nvif_object nvsw;
16
17 struct {
18 struct nouveau_bo *buffer;
19 struct nvkm_vma vma;
20 struct nvif_object ctxdma;
21 } push;
22
23 /* TODO: this will be reworked in the near future */
24 bool accel_done;
25 void *fence;
26 struct {
27 int max;
28 int free;
29 int cur;
30 int put;
31 int ib_base;
32 int ib_max;
33 int ib_free;
34 int ib_put;
35 } dma;
36 u32 user_get_hi;
37 u32 user_get;
38 u32 user_put;
39
40 struct nvif_object user;
41};
42
43
44int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *,
45 u32 arg0, u32 arg1, struct nouveau_channel **);
46void nouveau_channel_del(struct nouveau_channel **);
47int nouveau_channel_idle(struct nouveau_channel *);
48
49extern int nouveau_vram_pushbuf;
50
51#endif
1/* SPDX-License-Identifier: MIT */
2#ifndef __NOUVEAU_CHAN_H__
3#define __NOUVEAU_CHAN_H__
4#include <nvif/object.h>
5#include <nvif/notify.h>
6struct nvif_device;
7
8struct nouveau_channel {
9 struct nvif_device *device;
10 struct nouveau_drm *drm;
11 struct nouveau_vmm *vmm;
12
13 int chid;
14 u64 inst;
15 u32 token;
16
17 struct nvif_object vram;
18 struct nvif_object gart;
19 struct nvif_object nvsw;
20
21 struct {
22 struct nouveau_bo *buffer;
23 struct nouveau_vma *vma;
24 struct nvif_object ctxdma;
25 u64 addr;
26 } push;
27
28 /* TODO: this will be reworked in the near future */
29 bool accel_done;
30 void *fence;
31 struct {
32 int max;
33 int free;
34 int cur;
35 int put;
36 int ib_base;
37 int ib_max;
38 int ib_free;
39 int ib_put;
40 } dma;
41 u32 user_get_hi;
42 u32 user_get;
43 u32 user_put;
44
45 struct nvif_object user;
46
47 struct nvif_notify kill;
48 atomic_t killed;
49};
50
51int nouveau_channels_init(struct nouveau_drm *);
52
53int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *,
54 u32 arg0, u32 arg1, bool priv,
55 struct nouveau_channel **);
56void nouveau_channel_del(struct nouveau_channel **);
57int nouveau_channel_idle(struct nouveau_channel *);
58
59extern int nouveau_vram_pushbuf;
60
61#endif