Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 1 | #ifndef __NOUVEAU_CHAN_H__ |
| 2 | #define __NOUVEAU_CHAN_H__ |
| 3 | |
Ben Skeggs | 0ad7286 | 2014-08-10 04:10:22 +1000 | [diff] [blame] | 4 | #include <nvif/object.h> |
| 5 | struct nvif_device; |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 6 | |
| 7 | struct nouveau_channel { |
Ben Skeggs | 0ad7286 | 2014-08-10 04:10:22 +1000 | [diff] [blame] | 8 | struct nvif_device *device; |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 9 | struct nouveau_drm *drm; |
| 10 | |
Ben Skeggs | bbf8906 | 2014-08-10 04:10:25 +1000 | [diff] [blame] | 11 | int chid; |
| 12 | |
Ben Skeggs | 0ad7286 | 2014-08-10 04:10:22 +1000 | [diff] [blame] | 13 | struct nvif_object vram; |
| 14 | struct nvif_object gart; |
| 15 | struct nvif_object nvsw; |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 16 | |
| 17 | struct { |
| 18 | struct nouveau_bo *buffer; |
Ben Skeggs | be83cd4 | 2015-01-14 15:36:34 +1000 | [diff] [blame] | 19 | struct nvkm_vma vma; |
Ben Skeggs | 0ad7286 | 2014-08-10 04:10:22 +1000 | [diff] [blame] | 20 | struct nvif_object ctxdma; |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 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 | |
Ben Skeggs | a01ca78 | 2015-08-20 14:54:15 +1000 | [diff] [blame] | 40 | struct nvif_object user; |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 41 | }; |
| 42 | |
| 43 | |
Ben Skeggs | 0ad7286 | 2014-08-10 04:10:22 +1000 | [diff] [blame] | 44 | int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *, |
Ben Skeggs | fcf3f91 | 2015-09-04 14:40:32 +1000 | [diff] [blame] | 45 | u32 arg0, u32 arg1, struct nouveau_channel **); |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 46 | void nouveau_channel_del(struct nouveau_channel **); |
| 47 | int nouveau_channel_idle(struct nouveau_channel *); |
| 48 | |
Pierre Moreau | 703fa26 | 2014-08-18 22:43:24 +0200 | [diff] [blame] | 49 | extern int nouveau_vram_pushbuf; |
| 50 | |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 51 | #endif |