2015-01-14 15:13:36 +10:00
|
|
|
#ifndef __NVKM_VOLT_H__
|
|
|
|
#define __NVKM_VOLT_H__
|
2013-02-08 09:34:56 +10:00
|
|
|
#include <core/subdev.h>
|
|
|
|
|
2015-01-14 15:13:36 +10:00
|
|
|
struct nvkm_volt {
|
2015-08-20 14:54:21 +10:00
|
|
|
const struct nvkm_volt_func *func;
|
2015-08-20 14:54:07 +10:00
|
|
|
struct nvkm_subdev subdev;
|
2013-02-08 09:34:56 +10:00
|
|
|
|
|
|
|
u8 vid_mask;
|
|
|
|
u8 vid_nr;
|
|
|
|
struct {
|
|
|
|
u32 uv;
|
|
|
|
u8 vid;
|
|
|
|
} vid[256];
|
2016-02-26 07:49:08 +01:00
|
|
|
|
|
|
|
u32 max_uv;
|
|
|
|
u32 min_uv;
|
2016-07-12 21:36:08 +02: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;
|
2013-02-08 09:34:56 +10:00
|
|
|
};
|
|
|
|
|
2016-07-16 15:26:25 +02:00
|
|
|
int nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temperature);
|
2016-07-12 21:36:08 +02:00
|
|
|
int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id);
|
2015-08-20 14:54:21 +10:00
|
|
|
int nvkm_volt_get(struct nvkm_volt *);
|
2016-07-12 21:36:08 +02:00
|
|
|
int nvkm_volt_set_id(struct nvkm_volt *, u8 id, u8 min_id, u8 temp,
|
|
|
|
int condition);
|
2013-02-08 09:34:56 +10:00
|
|
|
|
2015-08-20 14:54:21 +10:00
|
|
|
int nv40_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
2015-09-09 00:34:33 +02:00
|
|
|
int gk104_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
2015-08-20 14:54:21 +10:00
|
|
|
int gk20a_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
2015-10-27 12:35:14 +09:00
|
|
|
int gm20b_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
2013-02-08 09:34:56 +10:00
|
|
|
#endif
|