search for: nvkm_volt_get

Displaying 20 results from an estimated 42 matches for "nvkm_volt_get".

2016 Apr 18
0
[PATCH v4 11/37] volt: add temperature parameter to nvkm_volt_map
...veau/nvkm/subdev/volt/base.c | 14 ++++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/nv_cmp_volt.c b/bin/nv_cmp_volt.c index c63d91b..34147b9 100644 --- a/bin/nv_cmp_volt.c +++ b/bin/nv_cmp_volt.c @@ -117,7 +117,7 @@ main(int argc, char **argv) new_voltage = nvkm_volt_get(volt); new_temp = nvkm_rd32(device, 0x20400);//nvkm_therm_temp_get(therm); - new_nouveau_voltage = max(nvkm_volt_map(volt, best_cstate->voltage), nvkm_volt_map(volt, best_pstate->base.voltage)); + new_nouveau_voltage = max(nvkm_volt_map(volt, best_cstate->voltage, new_temp), nvkm_volt...
2016 Apr 18
0
[PATCH v4 37/37] volt: add NvVoltOffsetmV option
...bdev/volt/base.c | 25 ++++++++++++++++++++----- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/bin/nv_cmp_volt.c b/bin/nv_cmp_volt.c index e61056c..d1a0402 100644 --- a/bin/nv_cmp_volt.c +++ b/bin/nv_cmp_volt.c @@ -117,7 +117,7 @@ main(int argc, char **argv) new_voltage = nvkm_volt_get(volt); new_temp = nvkm_rd32(device, 0x20400);//nvkm_therm_temp_get(therm); - new_nouveau_voltage = max(nvkm_volt_map(volt, best_cstate->voltage, new_temp), nvkm_volt_map(volt, best_pstate->base.voltage, new_temp)); + new_nouveau_voltage = max(nvkm_volt_map(volt, best_cstate->voltage,...
2019 Jun 18
1
[PATCH] hwmon: return EINVAL if the GPU is powered down for sensors reads
...return -EINVAL; *val = nvkm_therm_fan_sense(therm); break; default: @@ -494,6 +498,8 @@ nouveau_in_read(struct device *dev, u32 attr, int channel, long *val) switch (attr) { case hwmon_in_input: + if (drm_dev->switch_power_state != DRM_SWITCH_POWER_ON) + return -EINVAL; ret = nvkm_volt_get(volt); *val = ret < 0 ? ret : (ret / 1000); break; @@ -525,6 +531,8 @@ nouveau_pwm_read(struct device *dev, u32 attr, int channel, long *val) *val = therm->attr_get(therm, NVKM_THERM_ATTR_FAN_MODE); break; case hwmon_pwm_input: + if (drm_dev->switch_power_state != DRM_SWITCH...
2017 Apr 13
2
[PATCH 1/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
...on_pwm_input: + return 0644; + default: + return 0; + } +} + +static umode_t +nouveau_input_is_visible(const void *data, u32 attr, int channel) +{ + struct nouveau_drm *drm = nouveau_drm((struct drm_device *)data); + struct nvkm_volt *volt = nvxx_volt(&drm->client.device); + + if (!volt || nvkm_volt_get(volt) < 0) + return 0; + + switch (attr) { + case hwmon_in_input: + case hwmon_in_label: + case hwmon_in_min: + case hwmon_in_max: + return 0444; + default: + return 0; + } +} + +static umode_t +nouveau_fan_is_visible(const void *data, u32 attr, int channel) +{ + struct nouveau_drm *drm = nou...
2017 Apr 18
2
[PATCH v2 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string
...+} > + > +static umode_t > +nouveau_input_is_visible(const void *data, u32 attr, int channel) > +{ > + struct nouveau_drm *drm = nouveau_drm((struct drm_device *)data); > + struct nvkm_volt *volt = nvxx_volt(&drm->client.device); > + > + if (!volt || nvkm_volt_get(volt) < 0) > + return 0; > + > + switch (attr) { > + case hwmon_in_input: > + case hwmon_in_label: > + case hwmon_in_min: > + case hwmon_in_max: > + return 0444; > + default: > + return 0;...
2016 Feb 29
9
[PATCH 0/9] Groundwork for clocking fixes
This series contains a lot of groundwork to finally fix reclocking issues on Kepler+ gpus. There shouldn't be any functional changes with the first patch being the only exception (fixes some voltage table parsing issues with of few kepler gpus) The most interessting thing is the tool in the last patch, which can be ran alongside the nvidia driver to test nouveaus volting code and print the
2016 Mar 17
22
[PATCH 00/19] Volting/Clocking improvements for Fermi and newer
This series fixes most of the issues regarding volting on GPUs with any form of GPU Boost inside their vbios, which is mainly Kepler and newer, but we find some boosting related tables in Fermi vbios' already In the end reclocking should work on most Kepler cards without any issues Karol Herbst (19): bios/volt: handle voltage table version 0x50 with 0ed header volt: properly detect entry
2017 May 02
1
[PATCH v5 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string
...0; > + } > +} > + > +static umode_t > +nouveau_input_is_visible(const void *data, u32 attr, int channel) > +{ > + struct nouveau_drm *drm = nouveau_drm((struct drm_device *)data); > + struct nvkm_volt *volt = nvxx_volt(&drm->client.device); > + > + if (!volt || nvkm_volt_get(volt) < 0) > + return 0; > + > + switch (attr) { > + case hwmon_in_input: > + case hwmon_in_label: > + case hwmon_in_min: > + case hwmon_in_max: > + return 0444; > + default: > + return 0; > + } > +} > + > +static umode_t > +nouveau_fan_is_visible(...
2016 Mar 21
28
[PATCH v2 00/22] Volting/Clocking improvements for Fermi and newer
This series fixes most of the issues regarding volting on GPUs with any form of GPU Boost inside their vbios, which is mainly Kepler and newer, but we find some boosting related tables in Fermi vbios' already In the end reclocking should work on most Kepler cards without any issues v2: boost_mode can now be changed at runtime minor fixups Karol Herbst (22): bios/volt: handle voltage
2016 Apr 18
0
[PATCH v4 08/37] clk: export nvkm_volt_map
...bdev/volt.h index ec9d87d..870d212 100644 --- a/drm/nouveau/include/nvkm/subdev/volt.h +++ b/drm/nouveau/include/nvkm/subdev/volt.h @@ -22,6 +22,7 @@ struct nvkm_volt { u8 max2_id; }; +int nvkm_volt_map(struct nvkm_volt *volt, u8 id); int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id); int nvkm_volt_get(struct nvkm_volt *); int nvkm_volt_set_id(struct nvkm_volt *, u8 id, u8 min_id, int condition); diff --git a/drm/nouveau/nvkm/subdev/volt/base.c b/drm/nouveau/nvkm/subdev/volt/base.c index 1690c1c..6fb9d2e 100644 --- a/drm/nouveau/nvkm/subdev/volt/base.c +++ b/drm/nouveau/nvkm/subdev/volt/base.c @...
2017 Sep 15
0
[RFC PATCH 02/29] hwmon: properly check for errors
...*drm = nouveau_drm(drm_dev); struct nvkm_volt *volt = nvxx_volt(&drm->client.device); - int ret; + int ret = 0; if (!volt) return -EOPNOTSUPP; @@ -499,7 +504,8 @@ nouveau_in_read(struct device *dev, u32 attr, int channel, long *val) switch (attr) { case hwmon_in_input: ret = nvkm_volt_get(volt); - *val = ret < 0 ? ret : (ret / 1000); + if (ret >= 0) + *val = ret / 1000; break; case hwmon_in_min: *val = volt->min_uv > 0 ? (volt->min_uv / 1000) : -ENODEV; @@ -511,7 +517,7 @@ nouveau_in_read(struct device *dev, u32 attr, int channel, long *val) return -EOP...
2016 Mar 21
0
[PATCH v2 07/22] volt: add min_id parameter to nvkm_volt_set_id
.../drm/nouveau/include/nvkm/subdev/volt.h b/drm/nouveau/include/nvkm/subdev/volt.h index 3e0f8da..e966266 100644 --- a/drm/nouveau/include/nvkm/subdev/volt.h +++ b/drm/nouveau/include/nvkm/subdev/volt.h @@ -21,7 +21,7 @@ struct nvkm_volt { int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id); int nvkm_volt_get(struct nvkm_volt *); -int nvkm_volt_set_id(struct nvkm_volt *, u8 id, int condition); +int nvkm_volt_set_id(struct nvkm_volt *, u8 id, u8 min_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 **)...
2016 Apr 18
63
[PATCH v4 00/37] Volting/Clocking improvements for Fermi and newer
We are slowly getting there! v4 of the series with some realy good improvements, so I am sure this is like 95% done and only needs some proper polishing and proper Reviews! I also added the NvVoltOffsetmV module parameter, so that a user is able to over and !under!-volt the GPU. Overvolting makes sense, when there are still some reclocking issues left, which might be solved by a higher voltage.
2016 Apr 07
29
[PATCH v3 00/29] Volting/Clocking improvements for Fermi and newer
This is an updated series for the old clocking improvement one. I think I got everything needed in place and also a simple update mechanism for updating the cstates/voltage on temperature changes. If anything is unclear how I REed or got the information, please leave a note so that I can provide additional information in the commits. Besides that I think we are pretty close now and only some
2017 Apr 13
0
[PATCH 1/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
...+} > + > +static umode_t > +nouveau_input_is_visible(const void *data, u32 attr, int channel) > +{ > + struct nouveau_drm *drm = nouveau_drm((struct drm_device *)data); > + struct nvkm_volt *volt = nvxx_volt(&drm->client.device); > + > + if (!volt || nvkm_volt_get(volt) < 0) > + return 0; > + > + switch (attr) { > + case hwmon_in_input: > + case hwmon_in_label: > + case hwmon_in_min: > + case hwmon_in_max: > + return 0444; > + default: > + return 0;...
2017 Apr 17
0
[PATCH v2 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string
...on_pwm_input: + return 0644; + default: + return 0; + } +} + +static umode_t +nouveau_input_is_visible(const void *data, u32 attr, int channel) +{ + struct nouveau_drm *drm = nouveau_drm((struct drm_device *)data); + struct nvkm_volt *volt = nvxx_volt(&drm->client.device); + + if (!volt || nvkm_volt_get(volt) < 0) + return 0; + + switch (attr) { + case hwmon_in_input: + case hwmon_in_label: + case hwmon_in_min: + case hwmon_in_max: + return 0444; + default: + return 0; + } +} + +static umode_t +nouveau_fan_is_visible(const void *data, u32 attr, int channel) +{ + struct nouveau_drm *drm = nou...
2017 Apr 26
0
[PATCH v5 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string
...on_pwm_input: + return 0644; + default: + return 0; + } +} + +static umode_t +nouveau_input_is_visible(const void *data, u32 attr, int channel) +{ + struct nouveau_drm *drm = nouveau_drm((struct drm_device *)data); + struct nvkm_volt *volt = nvxx_volt(&drm->client.device); + + if (!volt || nvkm_volt_get(volt) < 0) + return 0; + + switch (attr) { + case hwmon_in_input: + case hwmon_in_label: + case hwmon_in_min: + case hwmon_in_max: + return 0444; + default: + return 0; + } +} + +static umode_t +nouveau_fan_is_visible(const void *data, u32 attr, int channel) +{ + struct nouveau_drm *drm = nou...
2017 Apr 22
0
[PATCH v4 2/5] nouveau_hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string
...on_pwm_input: + return 0644; + default: + return 0; + } +} + +static umode_t +nouveau_input_is_visible(const void *data, u32 attr, int channel) +{ + struct nouveau_drm *drm = nouveau_drm((struct drm_device *)data); + struct nvkm_volt *volt = nvxx_volt(&drm->client.device); + + if (!volt || nvkm_volt_get(volt) < 0) + return 0; + + switch (attr) { + case hwmon_in_input: + case hwmon_in_label: + case hwmon_in_min: + case hwmon_in_max: + return 0444; + default: + return 0; + } +} + +static umode_t +nouveau_fan_is_visible(const void *data, u32 attr, int channel) +{ + struct nouveau_drm *drm = nou...
2017 May 18
0
[PATCH v8 2/5] nouveau/hwmon: Add nouveau_hwmon_ops structure with .is_visible/.read_string
...on_pwm_input: + return 0644; + default: + return 0; + } +} + +static umode_t +nouveau_input_is_visible(const void *data, u32 attr, int channel) +{ + struct nouveau_drm *drm = nouveau_drm((struct drm_device *)data); + struct nvkm_volt *volt = nvxx_volt(&drm->client.device); + + if (!volt || nvkm_volt_get(volt) < 0) + return 0; + + switch (attr) { + case hwmon_in_input: + case hwmon_in_label: + case hwmon_in_min: + case hwmon_in_max: + return 0444; + default: + return 0; + } +} + +static umode_t +nouveau_fan_is_visible(const void *data, u32 attr, int channel) +{ + struct nouveau_drm *drm = nou...
2017 May 18
7
[PATCH v8 0/5] replace hwmon_device_register for hwmon_device_register_with_info
This v8 fixes removes dummy functions which only had a return and moves the code into the switch statements. Versions: v1 -> v2: * Keep temp attrs as read only v2 -> v3: * Code fix-ups: struct and string as const and add return within switch due to fallthrough * Add Signed-off-by to all commits v3 -> v4: * Rever const to struct attribute. Kbuild