blob: 2a02fd56cf185097c2fe60f3cef90c8c62e92cc0 [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 Skeggs0ad72862014-08-10 04:10:22 +100011 struct nvif_object vram;
12 struct nvif_object gart;
13 struct nvif_object nvsw;
Ben Skeggsebb945a2012-07-20 08:17:34 +100014
15 struct {
16 struct nouveau_bo *buffer;
17 struct nouveau_vma vma;
Ben Skeggs0ad72862014-08-10 04:10:22 +100018 struct nvif_object ctxdma;
Ben Skeggsebb945a2012-07-20 08:17:34 +100019 } push;
20
21 /* TODO: this will be reworked in the near future */
22 bool accel_done;
23 void *fence;
24 struct {
25 int max;
26 int free;
27 int cur;
28 int put;
29 int ib_base;
30 int ib_max;
31 int ib_free;
32 int ib_put;
33 } dma;
34 u32 user_get_hi;
35 u32 user_get;
36 u32 user_put;
37
Ben Skeggs967e7bd2014-08-10 04:10:22 +100038 struct nvif_object *object;
Ben Skeggsebb945a2012-07-20 08:17:34 +100039};
40
41
Ben Skeggs0ad72862014-08-10 04:10:22 +100042int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *,
43 u32 handle, u32 arg0, u32 arg1,
Ben Skeggsebb945a2012-07-20 08:17:34 +100044 struct nouveau_channel **);
45void nouveau_channel_del(struct nouveau_channel **);
46int nouveau_channel_idle(struct nouveau_channel *);
47
48#endif