Home | History | Annotate | Line # | Download | only in fifo
      1 /*	$NetBSD: gf100.h,v 1.3 2021/12/18 23:45:35 riastradh Exp $	*/
      2 
      3 /* SPDX-License-Identifier: MIT */
      4 #ifndef __GF100_FIFO_H__
      5 #define __GF100_FIFO_H__
      6 #define gf100_fifo(p) container_of((p), struct gf100_fifo, base)
      7 #include "priv.h"
      8 
      9 #include <subdev/mmu.h>
     10 
     11 struct gf100_fifo_chan;
     12 struct gf100_fifo {
     13 	struct nvkm_fifo base;
     14 
     15 	struct list_head chan;
     16 
     17 	struct {
     18 		struct work_struct work;
     19 		u64 mask;
     20 	} recover;
     21 
     22 	int pbdma_nr;
     23 
     24 	struct {
     25 		struct nvkm_memory *mem[2];
     26 		int active;
     27 #ifdef __NetBSD__
     28 		spinlock_t lock;
     29 		drm_waitqueue_t wait;
     30 #else
     31 		wait_queue_head_t wait;
     32 #endif
     33 	} runlist;
     34 
     35 	struct {
     36 		struct nvkm_memory *mem;
     37 		struct nvkm_vma *bar;
     38 	} user;
     39 };
     40 
     41 void gf100_fifo_intr_engine(struct gf100_fifo *);
     42 void gf100_fifo_runlist_insert(struct gf100_fifo *, struct gf100_fifo_chan *);
     43 void gf100_fifo_runlist_remove(struct gf100_fifo *, struct gf100_fifo_chan *);
     44 void gf100_fifo_runlist_commit(struct gf100_fifo *);
     45 #endif
     46