priv.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __NVKM_GR_PRIV_H__
  2. #define __NVKM_GR_PRIV_H__
  3. #define nvkm_gr(p) container_of((p), struct nvkm_gr, engine)
  4. #include <engine/gr.h>
  5. #include <core/enum.h>
  6. struct nvkm_fb_tile;
  7. struct nvkm_fifo_chan;
  8. int nvkm_gr_ctor(const struct nvkm_gr_func *, struct nvkm_device *,
  9. int index, bool enable, struct nvkm_gr *);
  10. bool nv04_gr_idle(struct nvkm_gr *);
  11. struct nvkm_gr_func {
  12. void *(*dtor)(struct nvkm_gr *);
  13. int (*oneinit)(struct nvkm_gr *);
  14. int (*init)(struct nvkm_gr *);
  15. void (*intr)(struct nvkm_gr *);
  16. void (*tile)(struct nvkm_gr *, int region, struct nvkm_fb_tile *);
  17. int (*tlb_flush)(struct nvkm_gr *);
  18. int (*chan_new)(struct nvkm_gr *, struct nvkm_fifo_chan *,
  19. const struct nvkm_oclass *, struct nvkm_object **);
  20. int (*object_get)(struct nvkm_gr *, int, struct nvkm_sclass *);
  21. /* Returns chipset-specific counts of units packed into an u64.
  22. */
  23. u64 (*units)(struct nvkm_gr *);
  24. struct nvkm_sclass sclass[];
  25. };
  26. extern const struct nvkm_bitfield nv04_gr_nsource[];
  27. extern const struct nvkm_object_func nv04_gr_object;
  28. extern const struct nvkm_bitfield nv10_gr_intr_name[];
  29. extern const struct nvkm_bitfield nv10_gr_nstatus[];
  30. extern const struct nvkm_enum nv50_data_error_names[];
  31. #endif