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 | 0ad7286 | 2014-08-10 04:10:22 +1000 | [diff] [blame^] | 11 | struct nvif_object vram; |
| 12 | struct nvif_object gart; |
| 13 | struct nvif_object nvsw; |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 14 | |
| 15 | struct { |
| 16 | struct nouveau_bo *buffer; |
| 17 | struct nouveau_vma vma; |
Ben Skeggs | 0ad7286 | 2014-08-10 04:10:22 +1000 | [diff] [blame^] | 18 | struct nvif_object ctxdma; |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 19 | } 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 Skeggs | 967e7bd | 2014-08-10 04:10:22 +1000 | [diff] [blame] | 38 | struct nvif_object *object; |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 39 | }; |
| 40 | |
| 41 | |
Ben Skeggs | 0ad7286 | 2014-08-10 04:10:22 +1000 | [diff] [blame^] | 42 | int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *, |
| 43 | u32 handle, u32 arg0, u32 arg1, |
Ben Skeggs | ebb945a | 2012-07-20 08:17:34 +1000 | [diff] [blame] | 44 | struct nouveau_channel **); |
| 45 | void nouveau_channel_del(struct nouveau_channel **); |
| 46 | int nouveau_channel_idle(struct nouveau_channel *); |
| 47 | |
| 48 | #endif |