search for: nvkm_therm_func

Displaying 20 results from an estimated 36 matches for "nvkm_therm_func".

2018 Jan 15
0
[RFC 1/4] drm/nouveau: Add support for basic clockgating on Kepler1
...vers/gpu/drm/nouveau/include/nvkm/subdev/therm.h @@ -46,6 +46,11 @@ enum nvkm_therm_attr_type { NVKM_THERM_ATTR_THRS_SHUTDOWN_HYST = 17, }; +enum nvkm_therm_clkgate_level { + NVKM_THERM_CLKGATE_NONE = 0, + NVKM_THERM_CLKGATE_CG, /* basic clockgating */ +}; + struct nvkm_therm { const struct nvkm_therm_func *func; struct nvkm_subdev subdev; @@ -85,17 +90,22 @@ struct nvkm_therm { int (*attr_get)(struct nvkm_therm *, enum nvkm_therm_attr_type); int (*attr_set)(struct nvkm_therm *, enum nvkm_therm_attr_type, int); + + enum nvkm_therm_clkgate_level clkgate_level; }; int nvkm_therm_temp_get(st...
2018 Jan 26
1
[RFC v2 1/4] drm/nouveau: Add support for basic clockgating on Kepler1
...therm, NVKM_THERM_CTRL_AUTO); > nvkm_therm_sensor_preinit(therm); > + nvkm_therm_clkgate_oneinit(therm); > return 0; > } > > @@ -374,15 +408,10 @@ nvkm_therm = { > .intr = nvkm_therm_intr, > }; > > -int > -nvkm_therm_new_(const struct nvkm_therm_func *func, struct nvkm_device *device, > - int index, struct nvkm_therm **ptherm) > +void > +nvkm_therm_ctor(struct nvkm_therm *therm, struct nvkm_device *device, > + int index, const struct nvkm_therm_func *func) > { > - struct nvkm_therm *therm; &g...
2018 Jan 26
0
[RFC v2 1/4] drm/nouveau: Add support for basic clockgating on Kepler1
...t nvkm_subdev *subdev) nvkm_therm_fan_ctor(therm); nvkm_therm_fan_mode(therm, NVKM_THERM_CTRL_AUTO); nvkm_therm_sensor_preinit(therm); + nvkm_therm_clkgate_oneinit(therm); return 0; } @@ -374,15 +408,10 @@ nvkm_therm = { .intr = nvkm_therm_intr, }; -int -nvkm_therm_new_(const struct nvkm_therm_func *func, struct nvkm_device *device, - int index, struct nvkm_therm **ptherm) +void +nvkm_therm_ctor(struct nvkm_therm *therm, struct nvkm_device *device, + int index, const struct nvkm_therm_func *func) { - struct nvkm_therm *therm; - - if (!(therm = *ptherm = kzalloc(sizeof(*therm), GFP_KERNEL))...
2018 Jan 26
0
[RFC v3 1/4] drm/nouveau: Add support for basic clockgating on Kepler1
...t nvkm_subdev *subdev) nvkm_therm_fan_ctor(therm); nvkm_therm_fan_mode(therm, NVKM_THERM_CTRL_AUTO); nvkm_therm_sensor_preinit(therm); + nvkm_therm_clkgate_oneinit(therm); return 0; } @@ -374,15 +408,10 @@ nvkm_therm = { .intr = nvkm_therm_intr, }; -int -nvkm_therm_new_(const struct nvkm_therm_func *func, struct nvkm_device *device, - int index, struct nvkm_therm **ptherm) +void +nvkm_therm_ctor(struct nvkm_therm *therm, struct nvkm_device *device, + int index, const struct nvkm_therm_func *func) { - struct nvkm_therm *therm; - - if (!(therm = *ptherm = kzalloc(sizeof(*therm), GFP_KERNEL))...
2018 Jan 15
6
[RFC 0/4] Implement full clockgating for Kepler1 and 2
It's here! After a lot of investigation, rewrites, and traces, I present the patch series to implement all known levels of clockgating for Kepler1 and Kepler2 GPUs. Starting with Fermi GPUs (this is probably present on earlier GPUs as well, but with a far less easy to manage interface), nvidia added two clockgating levels that are handled mostly in firmware (with the exception of course, of
2018 Jan 26
6
[RFC v2 0/4] Implement full clockgating for Kepler1 and 2
Next version of my patchseries for adding clockgating support for kepler1 and 2 on nouveau. The first version of this series can be found here: https://patchwork.freedesktop.org/series/36504/ Some minor changes: - Clarified that SLCG stands for 'secondary level clockgating', thanks for the small tip nvidia! - Removed the concept of levels, this was more useful for debugging then
2018 Jan 26
6
[RFC v3 0/4] Implement full clockgating for Kepler1 and 2
Next version of my patchseries for adding clockgating support for kepler1 and 2 on nouveau. The first version of this series can be found here: https://patchwork.freedesktop.org/series/36504/ Some very important changes: - Fix gf100_clkgate_init() to actually write registers! This got broken in the last version by accident - Dump the register packs and the resulting register writes into
2020 Aug 12
6
[PATCH] drm/nouveau: Add fine-grain temperature reporting
...aw(therm); + + if (raw_temp < 0) + return raw_temp; + return raw_temp * 1000 >> 8; +} + +static int +gp100_temp_get(struct nvkm_therm *therm) +{ + int raw_temp = gp100_temp_get_raw(therm); + + if (raw_temp < 0) + return raw_temp; + return raw_temp >> 8; +} + static const struct nvkm_therm_func gp100_therm = { .temp_get = gp100_temp_get, + .temp_millidegree_get = gp100_temp_millidegree_get, .program_alarms = nvkm_therm_program_alarms_polling, }; diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h index 21659daf1864..a530...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
..., "reading temperature from SHADOWed sensor\n"); - /* device valid */ - if (tsensor & 0x20000000) - return (inttemp >> 8); - else + /* device invalid */ + if (!(tsensor & 0x20000000)) return -ENODEV; + + *temp = inttemp >> 8; + return 0; } static const struct nvkm_therm_func diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c index 2c92ffb5f9d0..9753ad4bee4a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c @@ -70,7 +70,7 @@ nv40_sensor_setup(...
2018 Jan 29
5
[RFC v4 0/5] Implement full clockgating for Kepler1 and 2
Next version of my patchseries for adding clockgating support for kepler1 and 2 on nouveau. The first version of this series can be found here: https://patchwork.freedesktop.org/series/36504/ One small change: - Set therm->clkgate_enabled to false until the last patch, where we introduce the NvPmEnableGating option Lyude Paul (5): drm/nouveau: Add support for basic clockgating on
2017 Apr 26
1
[PATCH] drm/nouveau: Add support for clockgating on Fermi+
...rm/base.c > > b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c > > index df949fa..723c0c1 100644 > > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c > > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c > > @@ -393,6 +393,8 @@ nvkm_therm_new_(const struct nvkm_therm_func > > *func, struct nvkm_device *device, > >         therm->fan_set = nvkm_therm_fan_user_set; > >         therm->attr_get = nvkm_therm_attr_get; > >         therm->attr_set = nvkm_therm_attr_set; > > +       therm->clkgate_engine = nvkm_therm_clkgate_engine;...
2018 Jan 30
5
[RFC v5 0/5] Implement full clockgating for Kepler1 and 2
Next version of my patchseries for adding clockgating support for kepler1 and 2 on nouveau. The first version of this series can be found here: https://patchwork.freedesktop.org/series/36504/ One small change: - Add Martin's R-B, whoops Lyude Paul (5): drm/nouveau: Add support for basic clockgating on Kepler1 drm/nouveau: Add support for BLCG on Kepler1 drm/nouveau: Add support for
2017 Apr 25
6
[PATCH] drm/nouveau: Add support for clockgating on Fermi+
...ff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c index df949fa..723c0c1 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c @@ -393,6 +393,8 @@ nvkm_therm_new_(const struct nvkm_therm_func *func, struct nvkm_device *device, therm->fan_set = nvkm_therm_fan_user_set; therm->attr_get = nvkm_therm_attr_get; therm->attr_set = nvkm_therm_attr_set; + therm->clkgate_engine = nvkm_therm_clkgate_engine; + therm->clkgate_set = nvkm_therm_clkgate_set; therm->mode = ther...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...8); > > - else > > + /* device invalid */ > > + if (!(tsensor & 0x20000000)) > > return -ENODEV; > > + > > + *temp = inttemp >> 8; > > + return 0; > > } > > > > static const struct nvkm_therm_func > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c > > index 2c92ffb5f9d0..9753ad4bee4a 100644 > > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c > > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv4...
2018 Feb 01
5
[RFC v6 0/5] Implement full clockgating for Kepler1 and 2
Next version of my patchseries for adding clockgating support for kepler1 and 2 on nouveau. The first version of this series can be found here: https://patchwork.freedesktop.org/series/36504/ Some small changes (shouldn't change anything functionally): - Made gf100_therm_new, gk104_clkgate_pack, and gk110_fb_clkgate_blcg_init_unk_0 static (re: kbuild test bot) - Making all three of
2017 Apr 25
0
[PATCH] drm/nouveau: Add support for clockgating on Fermi+
...pu/drm/nouveau/nvkm/subdev/therm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c > index df949fa..723c0c1 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c > @@ -393,6 +393,8 @@ nvkm_therm_new_(const struct nvkm_therm_func *func, struct nvkm_device *device, > therm->fan_set = nvkm_therm_fan_user_set; > therm->attr_get = nvkm_therm_attr_get; > therm->attr_set = nvkm_therm_attr_set; > + therm->clkgate_engine = nvkm_therm_clkgate_engine; > + therm->clkgat...
2020 Sep 09
0
[PATCH] drm/nouveau: Add fine-grain temperature reporting
...; +} > + > +static int > +gp100_temp_get(struct nvkm_therm *therm) > +{ > + int raw_temp = gp100_temp_get_raw(therm); > + > + if (raw_temp < 0) > + return raw_temp; > + return raw_temp >> 8; > +} > + > static const struct nvkm_therm_func > gp100_therm = { > .temp_get = gp100_temp_get, > + .temp_millidegree_get = gp100_temp_millidegree_get, > .program_alarms = nvkm_therm_program_alarms_polling, > }; > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h b/drivers/gpu/drm/nouvea...
2020 Sep 16
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...000) > - return (inttemp >> 8); > - else > + /* device invalid */ > + if (!(tsensor & 0x20000000)) > return -ENODEV; > + > + *temp = inttemp >> 8; > + return 0; > } > > static const struct nvkm_therm_func > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c > index 2c92ffb5f9d0..9753ad4bee4a 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c > @@ -70,7 +7...
2015 Dec 21
0
[PATCH] therm: debug print the FSRM config on [nvc0, nvf0) cards
...ot;, + thr_8, thr_6, thr_2, thr_crit, (cfg_low & 0x38) >> 3, cfg_low & 0x7, 0x8 + (cfg_5 & 0x70 >> 4)); + if (thr_crit < 90 || thr_crit > 115) + nvkm_error(&therm->subdev, "invalid value for crit threshold: %i\n", thr_crit); +} + +static const struct nvkm_therm_func +gf100_therm = { + .init = gt215_therm_init, + .fini = g84_therm_fini, + .pwm_ctrl = nv50_fan_pwm_ctrl, + .pwm_get = nv50_fan_pwm_get, + .pwm_set = nv50_fan_pwm_set, + .pwm_clock = nv50_fan_pwm_clock, + .temp_get = g84_temp_get, + .fan_sense = gt215_therm_fan_sense, + .program_alarms = nvkm_therm_p...
2020 Sep 17
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
.../* device invalid */ > > > + if (!(tsensor & 0x20000000)) > > > return -ENODEV; > > > + > > > + *temp = inttemp >> 8; > > > + return 0; > > > } > > > > > > static const struct nvkm_therm_func > > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c > > > index 2c92ffb5f9d0..9753ad4bee4a 100644 > > > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c > > > +++ b/drivers/gpu/drm/nouveau/n...