search for: nouveau_therm_preinit

Displaying 11 results from an estimated 11 matches for "nouveau_therm_preinit".

2013 Sep 08
3
[PATCH 1/2] drm/nouveau/therm: ack any pending IRQ at init
...subdev *subdev) spin_lock_irqsave(&priv->sensor.alarm_program_lock, flags); - intr = nv_rd32(therm, 0x20100); + intr = nv_rd32(therm, 0x20100) & 0x3ff; /* THRS_4: downclock */ if (intr & 0x002) { @@ -209,6 +209,19 @@ nv84_therm_ctor(struct nouveau_object *parent, return nouveau_therm_preinit(&priv->base.base); } +int +nv84_therm_fini(struct nouveau_object *object, bool suspend) +{ + /* Disable PTherm IRQs */ + nv_wr32(object, 0x20000, 0x00000000); + + /* ACK all PTherm IRQs */ + nv_wr32(object, 0x20100, 0xffffffff); + nv_wr32(object, 0x1100, 0x10000); /* PBUS */ + + return _n...
2013 Feb 03
2
[PATCH 2/3] drm/nv40/therm: reset temperature sensor on init
...uveau/core/subdev/therm/nv40.c b/drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c index accc628..7d90844 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/nv40.c @@ -173,13 +173,23 @@ nv40_therm_ctor(struct nouveau_object *parent, return nouveau_therm_preinit(&priv->base.base); } +int +nv40_therm_init(struct nouveau_object *object) +{ + struct nouveau_therm *therm = (void *)object; + + nv40_sensor_setup(therm); + + return _nouveau_therm_init(object); +} + struct nouveau_oclass nv40_therm_oclass = { .handle = NV_SUBDEV(THERM, 0x40), .ofun...
2013 Aug 31
2
[PATCH] drm/nouveau/therm: ack any pending IRQ at init v2
...uveau/core/subdev/therm/nv84.c b/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c index 42ba633..8615d62 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c @@ -209,13 +209,30 @@ nv84_therm_ctor(struct nouveau_object *parent, return nouveau_therm_preinit(&priv->base.base); } +static int +nv84_therm_init(struct nouveau_object *object) +{ + struct nv84_therm_priv *priv = (void *)object; + int ret; + + ret = nouveau_therm_init(&priv->base.base); + if (ret) + return ret; + + /* ACK ptherm IRQs */ + nv_wr32(object, 0x20100, 0xffffffff)...
2013 Aug 30
5
[PATCH 1/2] drm/nouveau/bios/therm: handle vbioses with duplicate entries (mostly nva5)
From: Martin Peres <martin.peres at labri.fr> Some vbioses have extra useless entries after "the end" of the table. This is problematic since all of the vbios I found with this issue redefine the pwm freq divider to insane levels (52750 Hz instead of 2500), thus breaking fan management. The first solution to solve this mess would be to change the length of the table. The solution
2013 Aug 30
0
[PATCH 2/2] drm/nv84/therm: ack any pending IRQ at init
...uveau/core/subdev/therm/nv84.c b/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c index 42ba633..8615d62 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c @@ -209,13 +209,30 @@ nv84_therm_ctor(struct nouveau_object *parent, return nouveau_therm_preinit(&priv->base.base); } +static int +nv84_therm_init(struct nouveau_object *object) +{ + struct nv84_therm_priv *priv = (void *)object; + int ret; + + ret = nouveau_therm_init(&priv->base.base); + if (ret) + return ret; + + /* ACK ptherm IRQs */ + nv_wr32(object, 0x20100, 0xffffffff)...
2013 Sep 08
0
[PATCH 2/2] drm/nouveau/therm: enable fan management by default
...sertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/base.c b/drivers/gpu/drm/nouveau/core/subdev/therm/base.c index f1de7a9..aaf8285 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/base.c @@ -335,7 +335,7 @@ nouveau_therm_preinit(struct nouveau_therm *therm) nouveau_therm_ic_ctor(therm); nouveau_therm_fan_ctor(therm); - nouveau_therm_fan_mode(therm, NOUVEAU_THERM_CTRL_NONE); + nouveau_therm_fan_mode(therm, NOUVEAU_THERM_CTRL_AUTO); nouveau_therm_sensor_preinit(therm); return 0; } -- 1.8.4
2013 Sep 04
0
[PATCH] drm/nouveau/therm: ack any pending IRQ at init v2
...b/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c > index 42ba633..8615d62 100644 > --- a/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c > +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/nv84.c > @@ -209,13 +209,30 @@ nv84_therm_ctor(struct nouveau_object *parent, > return nouveau_therm_preinit(&priv->base.base); > } > > +static int > +nv84_therm_init(struct nouveau_object *object) > +{ > + struct nv84_therm_priv *priv = (void *)object; > + int ret; > + > + ret = nouveau_therm_init(&priv->base.base); > + if (ret) > +...
2014 Aug 16
0
[PATCH 3/3] gm107/therm: add PWM fan support
...m_get; + priv->base.base.pwm_set = gm107_fan_pwm_set; + priv->base.base.pwm_clock = gm107_fan_pwm_clock; + priv->base.base.temp_get = nv84_temp_get; + priv->base.base.fan_sense = nva3_therm_fan_sense; + priv->base.sensor.program_alarms = nouveau_therm_program_alarms_polling; + return nouveau_therm_preinit(&priv->base.base); +} + +struct nouveau_oclass +gm107_therm_oclass = { + .handle = NV_SUBDEV(THERM, 0x117), + .ofuncs = &(struct nouveau_ofuncs) { + .ctor = gm107_therm_ctor, + .dtor = _nouveau_therm_dtor, + .init = nvd0_therm_init, + .fini = nv84_therm_fini, + }, +}; diff --git a/nv...
2014 Aug 16
3
[PATCH 1/3] bios/fan: add support for maxwell's fan management table
From: Martin Peres <martin.peres at labri.fr> Re-use the therm-exported fan structure with only two minor modifications: - pwm_freq: u16 -> u32; - add fan_type (toggle or PWM) Signed-off-by: Martin Peres <martin.peres at free.fr> --- drm/Kbuild | 1 + drm/core/include/subdev/bios/fan.h | 1 + drm/core/subdev/bios/fan.c | 1 +
2013 Aug 12
5
[PATCH 0/5] Thermal management fixes
From: Martin Peres <martin.peres at labri.fr> This patchset is mostly about fixing fdo bug #66177, reported by Dash Four. This bug is about fan/temp management not working after a suspend/resume cycle. Fan/therm management relies on ptimer's alarm feature to call periodically multiple callbacks that poll the temperature and update the fan speed if needed. The problem is that there is
2014 Aug 17
9
[PATCH 01/10] bios/fan: add support for maxwell's fan management table v2
Re-use the therm-exported fan structure with only two minor modifications: - pwm_freq: u16 -> u32; - add fan_type (toggle or PWM) v2: - Do not memset the table to 0 as it erases the pre-set default values Signed-off-by: Martin Peres <martin.peres at free.fr> --- drm/Kbuild | 1 + drm/core/include/subdev/bios/fan.h | 1 + drm/core/subdev/bios/fan.c | 1