Linux Audio

Check our new training course

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