2015-01-14 13:13:36 +08:00
|
|
|
#ifndef __NVKM_VOLT_H__
|
|
|
|
#define __NVKM_VOLT_H__
|
2013-02-08 07:34:56 +08:00
|
|
|
#include <core/subdev.h>
|
|
|
|
|
2015-01-14 13:13:36 +08:00
|
|
|
struct nvkm_volt {
|
2015-08-20 12:54:21 +08:00
|
|
|
const struct nvkm_volt_func *func;
|
2015-08-20 12:54:07 +08:00
|
|
|
struct nvkm_subdev subdev;
|
2013-02-08 07:34:56 +08:00
|
|
|
|
|
|
|
u8 vid_mask;
|
|
|
|
u8 vid_nr;
|
|
|
|
struct {
|
|
|
|
u32 uv;
|
|
|
|
u8 vid;
|
|
|
|
} vid[256];
|
2016-02-26 14:49:08 +08:00
|
|
|
|
|
|
|
u32 max_uv;
|
|
|
|
u32 min_uv;
|
2016-07-13 03:36:08 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* These are fully functional map entries creating a sw ceiling for
|
|
|
|
* the voltage. These all can describe different kind of curves, so
|
|
|
|
* that for any given temperature a different one can return the lowest
|
|
|
|
* value of all three.
|
|
|
|
*/
|
|
|
|
u8 max0_id;
|
|
|
|
u8 max1_id;
|
|
|
|
u8 max2_id;
|
2016-07-18 02:05:45 +08:00
|
|
|
|
|
|
|
int speedo;
|
2013-02-08 07:34:56 +08:00
|
|
|
};
|
|
|
|
|
2016-07-16 21:26:25 +08:00
|
|
|
int nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temperature);
|
2016-07-13 03:36:08 +08:00
|
|
|
int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id);
|
2015-08-20 12:54:21 +08:00
|
|
|
int nvkm_volt_get(struct nvkm_volt *);
|
2016-07-13 03:36:08 +08:00
|
|
|
int nvkm_volt_set_id(struct nvkm_volt *, u8 id, u8 min_id, u8 temp,
|
|
|
|
int condition);
|
2013-02-08 07:34:56 +08:00
|
|
|
|
2015-08-20 12:54:21 +08:00
|
|
|
int nv40_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
2016-07-18 02:02:33 +08:00
|
|
|
int gf100_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
2015-09-09 06:34:33 +08:00
|
|
|
int gk104_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
2015-08-20 12:54:21 +08:00
|
|
|
int gk20a_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
2015-10-27 11:35:14 +08:00
|
|
|
int gm20b_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
2013-02-08 07:34:56 +08:00
|
|
|
#endif
|