Home | History | Annotate | Line # | Download | only in nouveau
nouveau_chan.h revision 1.2
      1 /*	$NetBSD: nouveau_chan.h,v 1.2 2018/08/27 04:58:24 riastradh Exp $	*/
      2 
      3 #ifndef __NOUVEAU_CHAN_H__
      4 #define __NOUVEAU_CHAN_H__
      5 
      6 #include <nvif/object.h>
      7 struct nvif_device;
      8 
      9 struct nouveau_channel {
     10 	struct nvif_device *device;
     11 	struct nouveau_drm *drm;
     12 
     13 	int chid;
     14 
     15 	struct nvif_object vram;
     16 	struct nvif_object gart;
     17 	struct nvif_object nvsw;
     18 
     19 	struct {
     20 		struct nouveau_bo *buffer;
     21 		struct nvkm_vma vma;
     22 		struct nvif_object ctxdma;
     23 	} push;
     24 
     25 	/* TODO: this will be reworked in the near future */
     26 	bool accel_done;
     27 	void *fence;
     28 	struct {
     29 		int max;
     30 		int free;
     31 		int cur;
     32 		int put;
     33 		int ib_base;
     34 		int ib_max;
     35 		int ib_free;
     36 		int ib_put;
     37 	} dma;
     38 	u32 user_get_hi;
     39 	u32 user_get;
     40 	u32 user_put;
     41 
     42 	struct nvif_object user;
     43 };
     44 
     45 
     46 int  nouveau_channel_new(struct nouveau_drm *, struct nvif_device *,
     47 			 u32 arg0, u32 arg1, struct nouveau_channel **);
     48 void nouveau_channel_del(struct nouveau_channel **);
     49 int  nouveau_channel_idle(struct nouveau_channel *);
     50 
     51 extern int nouveau_vram_pushbuf;
     52 
     53 #endif
     54