volt.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef __NVKM_VOLT_H__
  2. #define __NVKM_VOLT_H__
  3. #include <core/subdev.h>
  4. struct nvkm_volt {
  5. const struct nvkm_volt_func *func;
  6. struct nvkm_subdev subdev;
  7. u8 vid_mask;
  8. u8 vid_nr;
  9. struct {
  10. u32 uv;
  11. u8 vid;
  12. } vid[256];
  13. u32 max_uv;
  14. u32 min_uv;
  15. /*
  16. * These are fully functional map entries creating a sw ceiling for
  17. * the voltage. These all can describe different kind of curves, so
  18. * that for any given temperature a different one can return the lowest
  19. * value of all three.
  20. */
  21. u8 max0_id;
  22. u8 max1_id;
  23. u8 max2_id;
  24. int speedo;
  25. };
  26. int nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temperature);
  27. int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id);
  28. int nvkm_volt_get(struct nvkm_volt *);
  29. int nvkm_volt_set_id(struct nvkm_volt *, u8 id, u8 min_id, u8 temp,
  30. int condition);
  31. int nv40_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
  32. int gf100_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
  33. int gk104_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
  34. int gk20a_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
  35. int gm20b_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
  36. #endif