Lines Matching defs:newlevel
64 static int nvbl_setlevel(struct nvbl_softc *sc, int newlevel);
153 nvbl_setlevel(struct nvbl_softc *sc, int newlevel)
157 if (newlevel > 100)
158 newlevel = 100;
160 if (newlevel < 0)
161 newlevel = 0;
163 if (newlevel > 0)
164 newlevel = (newlevel * NVIDIA_BRIGHT_SCALE) + NVIDIA_BRIGHT_MIN;
167 pmc_reg |= NVIDIA_PMC_BL_EN | (newlevel << NVIDIA_PMC_BL_SHIFT);
192 int newlevel, error;
196 newlevel = nvbl_getlevel(sc);
198 error = sysctl_handle_int(oidp, &newlevel, 0, req);
203 return (nvbl_setlevel(sc, newlevel));