nv50.h 935 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef __NV50_GR_H__
  2. #define __NV50_GR_H__
  3. #define nv50_gr(p) container_of((p), struct nv50_gr, base)
  4. #include "priv.h"
  5. struct nv50_gr {
  6. struct nvkm_gr base;
  7. const struct nv50_gr_func *func;
  8. spinlock_t lock;
  9. u32 size;
  10. };
  11. int nv50_gr_new_(const struct nvkm_gr_func *, struct nvkm_device *, int index,
  12. struct nvkm_gr **);
  13. int nv50_gr_init(struct nvkm_gr *);
  14. void nv50_gr_intr(struct nvkm_gr *);
  15. u64 nv50_gr_units(struct nvkm_gr *);
  16. int g84_gr_tlb_flush(struct nvkm_gr *);
  17. #define nv50_gr_chan(p) container_of((p), struct nv50_gr_chan, object)
  18. struct nv50_gr_chan {
  19. struct nvkm_object object;
  20. struct nv50_gr *gr;
  21. };
  22. int nv50_gr_chan_new(struct nvkm_gr *, struct nvkm_fifo_chan *,
  23. const struct nvkm_oclass *, struct nvkm_object **);
  24. extern const struct nvkm_object_func nv50_gr_object;
  25. int nv50_grctx_init(struct nvkm_device *, u32 *size);
  26. void nv50_grctx_fill(struct nvkm_device *, struct nvkm_gpuobj *);
  27. #endif