Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 1 | #ifndef __NOUVEAU_CHAN_H__ |
| 2 | #define __NOUVEAU_CHAN_H__ |
| 3 | |
| 4 | struct nouveau_cli; |
| 5 | |
| 6 | struct nouveau_channel { |
| 7 | struct nouveau_cli *cli; |
| 8 | struct nouveau_drm *drm; |
| 9 | |
| 10 | u32 handle; |
| 11 | u32 vram; |
| 12 | u32 gart; |
| 13 | |
| 14 | struct { |
| 15 | struct nouveau_bo *buffer; |
| 16 | struct nouveau_vma vma; |
| 17 | u32 handle; |
| 18 | } push; |
| 19 | |
| 20 | /* TODO: this will be reworked in the near future */ |
| 21 | bool accel_done; |
| 22 | void *fence; |
| 23 | struct { |
| 24 | int max; |
| 25 | int free; |
| 26 | int cur; |
| 27 | int put; |
| 28 | int ib_base; |
| 29 | int ib_max; |
| 30 | int ib_free; |
| 31 | int ib_put; |
| 32 | } dma; |
| 33 | u32 user_get_hi; |
| 34 | u32 user_get; |
| 35 | u32 user_put; |
| 36 | |
Ben Skeggs | 967e7bd | 2014-08-10 04:10:22 +1000 | [diff] [blame^] | 37 | struct nvif_object *object; |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | |
| 41 | int nouveau_channel_new(struct nouveau_drm *, struct nouveau_cli *, |
Ben Skeggs | 4998104 | 2012-08-06 19:38:25 +1000 | [diff] [blame] | 42 | u32 parent, u32 handle, u32 arg0, u32 arg1, |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 43 | struct nouveau_channel **); |
| 44 | void nouveau_channel_del(struct nouveau_channel **); |
| 45 | int nouveau_channel_idle(struct nouveau_channel *); |
| 46 | |
| 47 | #endif |