search for: nouveau_hwmon_init

Displaying 20 results from an estimated 60 matches for "nouveau_hwmon_init".

2019 Dec 31
2
[PATCH] drm/nouveau: use NULL for pointer assignment.
...2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c index d445c6f3fece..1c3104d20571 100644 --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c @@ -741,7 +741,7 @@ nouveau_hwmon_init(struct drm_device *dev) special_groups[i++] = &pwm_fan_sensor_group; } - special_groups[i] = 0; + special_groups[i] = NULL; hwmon_dev = hwmon_device_register_with_info(dev->dev, "nouveau", dev, &nouveau_chip_info, special_groups); -- 2.17.1
2016 Feb 20
0
[PATCH v4 5/6] hwmon: don't require therm to be valid to get any data
...uveau_hwmon.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/drm/nouveau/nouveau_hwmon.c b/drm/nouveau/nouveau_hwmon.c index c4f77f5..a630192 100644 --- a/drm/nouveau/nouveau_hwmon.c +++ b/drm/nouveau/nouveau_hwmon.c @@ -643,9 +643,6 @@ nouveau_hwmon_init(struct drm_device *dev) return -ENOMEM; hwmon->dev = dev; - if (!therm || !therm->attr_get || !therm->attr_set) - return -ENODEV; - hwmon_dev = hwmon_device_register(&dev->pdev->dev); if (IS_ERR(hwmon_dev)) { ret = PTR_ERR(hwmon_dev); @@ -659,26 +656,28 @@ nouveau_...
2019 Oct 15
0
[PATCH] drm/nouveau/hwmon: fix use of integer as a pointer
The special_groups[] in nouveau_hwmon_init() is an array of pointers, so use NULL instead of '0' as the initialiser. Fixes the following sparse warning: drivers/gpu/drm/nouveau/nouveau_hwmon.c:744:29: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks <ben.dooks at codethink.co.uk> --- Cc: Ben Skeggs <...
2016 Feb 20
0
[PATCH v4 4/6] hwmon: add power consumption
...static const struct attribute_group hwmon_pwm_fan_attrgroup = { static const struct attribute_group hwmon_in0_attrgroup = { .attrs = hwmon_in0_attributes, }; +static const struct attribute_group hwmon_power_attrgroup = { + .attrs = hwmon_power_attributes, +}; #endif int @@ -603,6 +633,7 @@ nouveau_hwmon_init(struct drm_device *dev) struct nouveau_drm *drm = nouveau_drm(dev); struct nvkm_therm *therm = nvxx_therm(&drm->device); struct nvkm_volt *volt = nvxx_volt(&drm->device); + struct nvkm_iccsense *iccsense = nvxx_iccsense(&drm->device); struct nouveau_hwmon *hwmon; stru...
2016 Oct 25
1
[PATCH 3/3] hwmon: expose power_max and power_crit
...{ > static const struct attribute_group hwmon_power_attrgroup = { > .attrs = hwmon_power_attributes, > }; > +static const struct attribute_group hwmon_power_caps_attrgroup = { > + .attrs = hwmon_power_caps_attributes, > +}; > #endif > > int > @@ -728,8 +763,16 @@ nouveau_hwmon_init(struct drm_device *dev) > if (iccsense && iccsense->data_valid && !list_empty(&iccsense->rails)) { > ret = sysfs_create_group(&hwmon_dev->kobj, > &hwmon_power_attrgroup); > + > if (ret) > goto error; > + > + if (iccsen...
2016 Feb 20
12
[PATCH v4 0/6] Suppor for various power sensors on GF100+
This is a complete rework from the first version I sent out. Now the implementation is more centered around the power_rails we find in the SENSE table instead of extdev centered. This makes the implementation a lot easier and straightforward. I've added support for the INA219, INA209 and INA3221 sensors found on multiple Fermi and Kepler cards. The power consumption is also exported via
2017 Nov 22
2
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...*val = therm->attr_get(therm, NVKM_THERM_ATTR_THRS_DOWN_CLK) > @@ -459,7 +461,7 @@ nouveau_temp_read(struct device *dev, u32 attr, int channel, long *val) > return -EOPNOTSUPP; > } > > - return 0; > + return ret; > } > > static int > @@ -713,6 +715,7 @@ nouveau_hwmon_init(struct drm_device *dev) > struct device *hwmon_dev; > int ret = 0; > int i = 0; > + int val; > > hwmon = drm->hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL); > if (!hwmon) > @@ -720,7 +723,7 @@ nouveau_hwmon_init(struct drm_device *dev) > hwmon->dev = dev...
2017 Oct 08
1
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...*val = therm->attr_get(therm, NVKM_THERM_ATTR_THRS_DOWN_CLK) > @@ -459,7 +461,7 @@ nouveau_temp_read(struct device *dev, u32 attr, int channel, long *val) > return -EOPNOTSUPP; > } > > - return 0; > + return ret; > } > > static int > @@ -713,6 +715,7 @@ nouveau_hwmon_init(struct drm_device *dev) > struct device *hwmon_dev; > int ret = 0; > int i = 0; > + int val; > > hwmon = drm->hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL); > if (!hwmon) > @@ -720,7 +723,7 @@ nouveau_hwmon_init(struct drm_device *dev) > hwmon->dev = dev...
2017 Sep 15
0
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...= temp * 1000; break; case hwmon_temp_max: *val = therm->attr_get(therm, NVKM_THERM_ATTR_THRS_DOWN_CLK) @@ -459,7 +461,7 @@ nouveau_temp_read(struct device *dev, u32 attr, int channel, long *val) return -EOPNOTSUPP; } - return 0; + return ret; } static int @@ -713,6 +715,7 @@ nouveau_hwmon_init(struct drm_device *dev) struct device *hwmon_dev; int ret = 0; int i = 0; + int val; hwmon = drm->hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL); if (!hwmon) @@ -720,7 +723,7 @@ nouveau_hwmon_init(struct drm_device *dev) hwmon->dev = dev; if (therm && therm->attr_get...
2017 Nov 22
1
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...nouveau_temp_read(struct device *dev, u32 attr, int channel, long *val) >>> return -EOPNOTSUPP; >>> } >>> >>> - return 0; >>> + return ret; >>> } >>> >>> static int >>> @@ -713,6 +715,7 @@ nouveau_hwmon_init(struct drm_device *dev) >>> struct device *hwmon_dev; >>> int ret = 0; >>> int i = 0; >>> + int val; >>> >>> hwmon = drm->hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL); >>> if (!hwmon) >>> @@...
2016 Mar 02
0
[PATCH] hwmon: fix crash on non-PCI platforms
...idia.com> --- drm/nouveau/nouveau_hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drm/nouveau/nouveau_hwmon.c b/drm/nouveau/nouveau_hwmon.c index 3fa1e78e4ece..67edd2f5b71a 100644 --- a/drm/nouveau/nouveau_hwmon.c +++ b/drm/nouveau/nouveau_hwmon.c @@ -640,7 +640,7 @@ nouveau_hwmon_init(struct drm_device *dev) return -ENOMEM; hwmon->dev = dev; - hwmon_dev = hwmon_device_register(&dev->pdev->dev); + hwmon_dev = hwmon_device_register(dev->dev); if (IS_ERR(hwmon_dev)) { ret = PTR_ERR(hwmon_dev); NV_ERROR(drm, "Unable to register hwmon device: %d\n&...
2016 Oct 24
0
[PATCH 3/3] hwmon: expose power_max and power_crit
...st struct attribute_group hwmon_in0_attrgroup = { static const struct attribute_group hwmon_power_attrgroup = { .attrs = hwmon_power_attributes, }; +static const struct attribute_group hwmon_power_caps_attrgroup = { + .attrs = hwmon_power_caps_attributes, +}; #endif int @@ -728,8 +763,16 @@ nouveau_hwmon_init(struct drm_device *dev) if (iccsense && iccsense->data_valid && !list_empty(&iccsense->rails)) { ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_power_attrgroup); + if (ret) goto error; + + if (iccsense->power_w_max && iccsense-&...
2017 Apr 13
0
[PATCH 3/4] nouveau_hwmon: migrate to hwmon_device_register_with_info
...sor_dev_attr_temp1_auto_point1_temp.dev_attr.attr, + &sensor_dev_attr_temp1_auto_point1_temp_hyst.dev_attr.attr, + NULL +}; +ATTRIBUTE_GROUPS(temp1_auto_point_sensor); + +#define N_ATTR_GROUPS 3 + static const u32 nouveau_config_chip[] = { HWMON_C_UPDATE_INTERVAL, 0 @@ -868,17 +885,27 @@ nouveau_hwmon_init(struct drm_device *de #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) struct nouveau_drm *drm = nouveau_drm(dev); struct nvkm_therm *therm = nvxx_therm(&drm->client.device); + const struct attribute_group *special_groups[N_ATTR_GROUPS]; struct no...
2017 Apr 17
0
[PATCH v2 4/5] nouveau_hwmon: Add support for auto_point attributes
...sor_dev_attr_temp1_auto_point1_temp.dev_attr.attr, + &sensor_dev_attr_temp1_auto_point1_temp_hyst.dev_attr.attr, + NULL +}; +ATTRIBUTE_GROUPS(temp1_auto_point_sensor); + +#define N_ATTR_GROUPS 3 + static const u32 nouveau_config_chip[] = { HWMON_C_UPDATE_INTERVAL, 0 @@ -789,17 +806,27 @@ nouveau_hwmon_init(struct drm_device *dev) #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) struct nouveau_drm *drm = nouveau_drm(dev); struct nvkm_therm *therm = nvxx_therm(&drm->client.device); + const struct attribute_group *special_groups[N_ATTR_GROUPS]; struct...
2017 Apr 21
0
[PATCH v3 4/5] nouveau_hwmon: Add support for auto_point attributes
...r_dev_attr_temp1_auto_point1_temp.dev_attr.attr, + &sensor_dev_attr_temp1_auto_point1_temp_hyst.dev_attr.attr, + NULL +}; +ATTRIBUTE_GROUPS(temp1_auto_point_sensor); + +#define N_ATTR_GROUPS 3 + + static const u32 nouveau_config_chip[] = { HWMON_C_UPDATE_INTERVAL, 0 @@ -793,17 +811,27 @@ nouveau_hwmon_init(struct drm_device *dev) #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) struct nouveau_drm *drm = nouveau_drm(dev); struct nvkm_therm *therm = nvxx_therm(&drm->client.device); + const struct attribute_group *special_groups[N_ATTR_GROUPS]; struct...
2017 Apr 26
0
[PATCH v5 4/5] nouveau_hwmon: Add support for auto_point attributes
...sor_dev_attr_temp1_auto_point1_temp.dev_attr.attr, + &sensor_dev_attr_temp1_auto_point1_temp_hyst.dev_attr.attr, + NULL +}; +ATTRIBUTE_GROUPS(temp1_auto_point_sensor); + +#define N_ATTR_GROUPS 3 + static const u32 nouveau_config_chip[] = { HWMON_C_UPDATE_INTERVAL, 0 @@ -792,17 +809,27 @@ nouveau_hwmon_init(struct drm_device *dev) #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) struct nouveau_drm *drm = nouveau_drm(dev); struct nvkm_therm *therm = nvxx_therm(&drm->client.device); + const struct attribute_group *special_groups[N_ATTR_GROUPS]; struct...
2018 Apr 22
0
[PATCH] drm/nouveau: fix temp/pwm visibility, skip hwmon when no sensors exist
...rm->client.device); - if (therm && therm->attr_get && therm->fan_get && - therm->fan_get(therm) < 0) + if (!therm || !therm->attr_get || !therm->fan_get || + therm->fan_get(therm) < 0) return 0; switch (attr) { @@ -707,13 +707,20 @@ nouveau_hwmon_init(struct drm_device *dev) { #if defined(CONFIG_HWMON) || (defined(MODULE) && defined(CONFIG_HWMON_MODULE)) struct nouveau_drm *drm = nouveau_drm(dev); + struct nvkm_iccsense *iccsense = nvxx_iccsense(&drm->client.device); struct nvkm_therm *therm = nvxx_therm(&drm->client....
2020 Jan 01
0
[PATCH] drm/nouveau: use NULL for pointer assignment.
...ion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c > index d445c6f3fece..1c3104d20571 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c > +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c > @@ -741,7 +741,7 @@ nouveau_hwmon_init(struct drm_device *dev) > special_groups[i++] = &pwm_fan_sensor_group; > } > > - special_groups[i] = 0; > + special_groups[i] = NULL; > hwmon_dev = hwmon_device_register_with_info(dev->dev, "nouveau", dev, > &nouveau_chip_info, >...
2017 Nov 17
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...= temp * 1000; break; case hwmon_temp_max: *val = therm->attr_get(therm, NVKM_THERM_ATTR_THRS_DOWN_CLK) @@ -459,7 +461,7 @@ nouveau_temp_read(struct device *dev, u32 attr, int channel, long *val) return -EOPNOTSUPP; } - return 0; + return ret; } static int @@ -713,6 +715,7 @@ nouveau_hwmon_init(struct drm_device *dev) struct device *hwmon_dev; int ret = 0; int i = 0; + int val; hwmon = drm->hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL); if (!hwmon) @@ -720,7 +723,7 @@ nouveau_hwmon_init(struct drm_device *dev) hwmon->dev = dev; if (therm && therm->attr_get...
2016 Aug 22
10
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
...clude "nouveau_gem.h" #include "nouveau_vga.h" +#include "nouveau_led.h" #include "nouveau_hwmon.h" #include "nouveau_acpi.h" #include "nouveau_bios.h" @@ -468,6 +469,7 @@ nouveau_drm_load(struct drm_device *dev, unsigned long flags) nouveau_hwmon_init(dev); nouveau_accel_init(drm); nouveau_fbcon_init(dev); + nouveau_led_init(dev); if (nouveau_runtime_pm != 0) { pm_runtime_use_autosuspend(dev->dev); @@ -499,6 +501,7 @@ nouveau_drm_unload(struct drm_device *dev) struct nouveau_drm *drm = nouveau_drm(dev); pm_runtime_get_sync(de...