Home | History | Annotate | Line # | Download | only in gr
      1 /*	$NetBSD: nv20.h,v 1.3 2021/12/18 23:45:36 riastradh Exp $	*/
      2 
      3 /* SPDX-License-Identifier: MIT */
      4 #ifndef __NV20_GR_H__
      5 #define __NV20_GR_H__
      6 #define nv20_gr(p) container_of((p), struct nv20_gr, base)
      7 #include "priv.h"
      8 
      9 struct nv20_gr {
     10 	struct nvkm_gr base;
     11 	struct nvkm_memory *ctxtab;
     12 };
     13 
     14 int nv20_gr_new_(const struct nvkm_gr_func *, struct nvkm_device *,
     15 		 int, struct nvkm_gr **);
     16 void *nv20_gr_dtor(struct nvkm_gr *);
     17 int nv20_gr_oneinit(struct nvkm_gr *);
     18 int nv20_gr_init(struct nvkm_gr *);
     19 void nv20_gr_intr(struct nvkm_gr *);
     20 void nv20_gr_tile(struct nvkm_gr *, int, struct nvkm_fb_tile *);
     21 
     22 int nv30_gr_init(struct nvkm_gr *);
     23 
     24 #define nv20_gr_chan(p) container_of((p), struct nv20_gr_chan, object)
     25 #include <core/object.h>
     26 
     27 struct nv20_gr_chan {
     28 	struct nvkm_object object;
     29 	struct nv20_gr *gr;
     30 	int chid;
     31 	struct nvkm_memory *inst;
     32 };
     33 
     34 void *nv20_gr_chan_dtor(struct nvkm_object *);
     35 int nv20_gr_chan_init(struct nvkm_object *);
     36 int nv20_gr_chan_fini(struct nvkm_object *, bool);
     37 #endif
     38