blob: 48062c94f36d7291a6c9f16213e08ca770db2b64 [file] [log] [blame]
Ben Skeggsebb945a2012-07-20 08:17:34 +10001#ifndef __NOUVEAU_CHAN_H__
2#define __NOUVEAU_CHAN_H__
3
Ben Skeggs0ad72862014-08-10 04:10:22 +10004#include <nvif/object.h>
5struct nvif_device;
Ben Skeggsebb945a2012-07-20 08:17:34 +10006
7struct nouveau_channel {
Ben Skeggs0ad72862014-08-10 04:10:22 +10008 struct nvif_device *device;
Ben Skeggsebb945a2012-07-20 08:17:34 +10009 struct nouveau_drm *drm;
10
Ben Skeggsbbf89062014-08-10 04:10:25 +100011 int chid;
12
Ben Skeggs0ad72862014-08-10 04:10:22 +100013 struct nvif_object vram;
14 struct nvif_object gart;
15 struct nvif_object nvsw;
Ben Skeggsebb945a2012-07-20 08:17:34 +100016
17 struct {
18 struct nouveau_bo *buffer;
Ben Skeggsbe83cd42015-01-14 15:36:34 +100019 struct nvkm_vma vma;
Ben Skeggs0ad72862014-08-10 04:10:22 +100020 struct nvif_object ctxdma;
Ben Skeggsebb945a2012-07-20 08:17:34 +100021 } 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
Ben Skeggsa01ca782015-08-20 14:54:15 +100040 struct nvif_object user;
Ben Skeggsebb945a2012-07-20 08:17:34 +100041};
42
43
Ben Skeggs0ad72862014-08-10 04:10:22 +100044int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *,
Ben Skeggsfcf3f912015-09-04 14:40:32 +100045 u32 arg0, u32 arg1, struct nouveau_channel **);
Ben Skeggsebb945a2012-07-20 08:17:34 +100046void nouveau_channel_del(struct nouveau_channel **);
47int nouveau_channel_idle(struct nouveau_channel *);
48
Pierre Moreau703fa262014-08-18 22:43:24 +020049extern int nouveau_vram_pushbuf;
50
Ben Skeggsebb945a2012-07-20 08:17:34 +100051#endif