mirror of
https://github.com/torvalds/linux.git
synced 2026-04-23 09:05:50 -04:00
We shouldn't set voltages below the min or above the max voltage the gpu is able to set, so save the range for future lookups. Signed-off-by: Karol Herbst <karolherbst@gmail.de> Reviewed-by: Martin Peres <martin.peres@free.fr> Tested-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
28 lines
640 B
C
28 lines
640 B
C
#ifndef __NVKM_VOLT_H__
|
|
#define __NVKM_VOLT_H__
|
|
#include <core/subdev.h>
|
|
|
|
struct nvkm_volt {
|
|
const struct nvkm_volt_func *func;
|
|
struct nvkm_subdev subdev;
|
|
|
|
u8 vid_mask;
|
|
u8 vid_nr;
|
|
struct {
|
|
u32 uv;
|
|
u8 vid;
|
|
} vid[256];
|
|
|
|
u32 max_uv;
|
|
u32 min_uv;
|
|
};
|
|
|
|
int nvkm_volt_get(struct nvkm_volt *);
|
|
int nvkm_volt_set_id(struct nvkm_volt *, u8 id, int condition);
|
|
|
|
int nv40_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
|
int gk104_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
|
int gk20a_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
|
int gm20b_volt_new(struct nvkm_device *, int, struct nvkm_volt **);
|
|
#endif
|