1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __NOUVEAU_CHAN_H__ 3 #define __NOUVEAU_CHAN_H__ 4 #include <nvif/object.h> 5 #include <nvif/notify.h> 6 struct nvif_device; 7 8 struct nouveau_channel { 9 struct nvif_device *device; 10 struct nouveau_drm *drm; 11 12 int chid; 13 14 struct nvif_object vram; 15 struct nvif_object gart; 16 struct nvif_object nvsw; 17 18 struct { 19 struct nouveau_bo *buffer; 20 struct nvkm_vma vma; 21 struct nvif_object ctxdma; 22 } push; 23 24 /* TODO: this will be reworked in the near future */ 25 bool accel_done; 26 void *fence; 27 struct { 28 int max; 29 int free; 30 int cur; 31 int put; 32 int ib_base; 33 int ib_max; 34 int ib_free; 35 int ib_put; 36 } dma; 37 u32 user_get_hi; 38 u32 user_get; 39 u32 user_put; 40 41 struct nvif_object user; 42 43 struct nvif_notify kill; 44 atomic_t killed; 45 }; 46 47 48 int nouveau_channel_new(struct nouveau_drm *, struct nvif_device *, 49 u32 arg0, u32 arg1, struct nouveau_channel **); 50 void nouveau_channel_del(struct nouveau_channel **); 51 int nouveau_channel_idle(struct nouveau_channel *); 52 53 extern int nouveau_vram_pushbuf; 54 55 #endif 56