Displaying 20 results from an estimated 35 matches for "nvkm_alarm".
2016 Apr 20
2
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
...mapped to pstate */
> - level = cur_level = clk->pstate;
> + level = cur_level = clk->pstate->pstate;
>
> if (load > data->p_load_max) {
> level = min(clk->state_nr - 1, level + (clk->state_nr / 3));
> @@ -150,12 +147,6 @@ gk20a_pmu_dvfs_work(struct nvkm_alarm *alarm)
> nvkm_trace(subdev, "utilization = %d %%, avg_load = %d %%\n",
> utilization, data->avg_load);
>
> - ret = gk20a_pmu_dvfs_get_cur_state(pmu, &state);
> - if (ret) {
> - nvkm_warn(subdev, "failed to get current state\n");
> - go...
2017 Nov 22
2
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...te;
> - int temp = therm->func->temp_get(therm);
> + int temp;
> +
> + if (therm->func->temp_get(therm, &temp))
> + return;
>
> prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name);
>
> @@ -166,6 +172,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)
> struct nvbios_therm_sensor *sensor = &therm->bios_sensor;
> struct nvkm_timer *tmr = therm->subdev.device->timer;
> unsigned long flags;
> + int val;
>
> spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags);
>
> @@ -185,7 +192...
2017 Oct 08
1
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...; - int temp = therm->func->temp_get(therm);
> + int temp;
> +
> + if (therm->func->temp_get(therm, &temp) < 0)
> + return;
>
> prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name);
>
> @@ -166,6 +172,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)
> struct nvbios_therm_sensor *sensor = &therm->bios_sensor;
> struct nvkm_timer *tmr = therm->subdev.device->timer;
> unsigned long flags;
> + int val;
>
> spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags);
>
> @@ -185,7 +192...
2017 Sep 15
0
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...m_therm_thrs_state prev_state, new_state;
- int temp = therm->func->temp_get(therm);
+ int temp;
+
+ if (therm->func->temp_get(therm, &temp) < 0)
+ return;
prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name);
@@ -166,6 +172,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)
struct nvbios_therm_sensor *sensor = &therm->bios_sensor;
struct nvkm_timer *tmr = therm->subdev.device->timer;
unsigned long flags;
+ int val;
spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags);
@@ -185,7 +192,7 @@ alarm_timer_callback(struct nvkm_a...
2017 Nov 22
1
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...mp;
>>> +
>>> + if (therm->func->temp_get(therm, &temp))
>>> + return;
>>>
>>> prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name);
>>>
>>> @@ -166,6 +172,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)
>>> struct nvbios_therm_sensor *sensor = &therm->bios_sensor;
>>> struct nvkm_timer *tmr = therm->subdev.device->timer;
>>> unsigned long flags;
>>> + int val;
>>>
>>> spin_lock_irqsave(&therm...
2016 Apr 18
0
[PATCH v4 33/37] therm: trigger reclock in temperature daemon
...ex 0c0feec..566fe5d 100644
--- a/drm/nouveau/nvkm/subdev/therm/base.c
+++ b/drm/nouveau/nvkm/subdev/therm/base.c
@@ -23,6 +23,8 @@
*/
#include "priv.h"
+#include <subdev/clk.h>
+
int
nvkm_therm_temp_get(struct nvkm_therm *therm)
{
@@ -153,7 +155,10 @@ nvkm_therm_alarm(struct nvkm_alarm *alarm)
{
struct nvkm_therm *therm =
container_of(alarm, struct nvkm_therm, alarm);
+ struct nvkm_clk *clk = therm->subdev.device->clk;
nvkm_therm_update(therm, -1);
+ if (clk)
+ nvkm_clk_update(clk, false);
}
int
--
2.8.1
2017 Sep 15
0
[RFC PATCH 14/29] therm: Trigger reclock in temperature daemon
....c90b9cfc 100644
--- a/drm/nouveau/nvkm/subdev/therm/base.c
+++ b/drm/nouveau/nvkm/subdev/therm/base.c
@@ -23,6 +23,8 @@
*/
#include "priv.h"
+#include <subdev/clk.h>
+
int
nvkm_therm_temp_get(struct nvkm_therm *therm, int *val)
{
@@ -168,9 +170,15 @@ nvkm_therm_alarm(struct nvkm_alarm *alarm)
int temp;
struct nvkm_therm *therm =
container_of(alarm, struct nvkm_therm, alarm);
+ struct nvkm_clk *clk = therm->subdev.device->clk;
+
if (nvkm_therm_temp_get(therm, &temp) >= 0)
therm->last_temp = temp;
+
nvkm_therm_update(therm, therm->last_temp,...
2017 Oct 08
1
[RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate
...ctly mapped to pstate */
> - level = cur_level = clk->pstate;
> + level = cur_level = clk->pstate->pstate;
>
> if (load > data->p_load_max) {
> level = min(clk->state_nr - 1, level + (clk->state_nr / 3));
> @@ -142,8 +140,6 @@ gk20a_pmu_dvfs_work(struct nvkm_alarm *alarm)
> nvkm_trace(subdev, "utilization = %d %%, avg_load = %d %%\n",
> utilization, data->avg_load);
>
> - gk20a_pmu_dvfs_get_cur_state(pmu, &state);
> -
> if (gk20a_pmu_dvfs_get_target_state(pmu, &state, data->avg_load)) {
> nvkm_trace...
2017 Nov 17
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...num nvkm_therm_thrs_state prev_state, new_state;
- int temp = therm->func->temp_get(therm);
+ int temp;
+
+ if (therm->func->temp_get(therm, &temp))
+ return;
prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name);
@@ -166,6 +172,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)
struct nvbios_therm_sensor *sensor = &therm->bios_sensor;
struct nvkm_timer *tmr = therm->subdev.device->timer;
unsigned long flags;
+ int val;
spin_lock_irqsave(&therm->sensor.alarm_program_lock, flags);
@@ -185,7 +192,7 @@ alarm_timer_callback(struct nvkm_a...
2017 Nov 22
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...herm);
>> + int temp;
>> +
>> + if (therm->func->temp_get(therm, &temp))
>> + return;
>>
>> prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name);
>>
>> @@ -166,6 +172,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)
>> struct nvbios_therm_sensor *sensor = &therm->bios_sensor;
>> struct nvkm_timer *tmr = therm->subdev.device->timer;
>> unsigned long flags;
>> + int val;
>>
>> spin_lock_irqsave(&therm->sensor.alarm_progra...
2017 Sep 02
3
[PATCH 0/3] Several hwmon fixes
We should simply return errors while the GPU is turned off, because the sensors
aren't accessable and setting any kind of value doesn't make any sense. Fixes
sensors values reported by "sensors"
Before:
nouveau-pci-0100
Adapter: PCI adapter
GPU core: +0.60 V (min = +0.60 V, max = +1.20 V)
temp1: -0.0°C (high = +95.0°C, hyst = +3.0°C)
(crit
2016 Apr 18
0
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
...the performance level is directly mapped to pstate */
- level = cur_level = clk->pstate;
+ level = cur_level = clk->pstate->pstate;
if (load > data->p_load_max) {
level = min(clk->state_nr - 1, level + (clk->state_nr / 3));
@@ -150,12 +147,6 @@ gk20a_pmu_dvfs_work(struct nvkm_alarm *alarm)
nvkm_trace(subdev, "utilization = %d %%, avg_load = %d %%\n",
utilization, data->avg_load);
- ret = gk20a_pmu_dvfs_get_cur_state(pmu, &state);
- if (ret) {
- nvkm_warn(subdev, "failed to get current state\n");
- goto resched;
- }
-
if (gk20a_pmu_dvfs...
2016 Apr 20
0
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
...level = clk->pstate;
>> + level = cur_level = clk->pstate->pstate;
>> if (load > data->p_load_max) {
>> level = min(clk->state_nr - 1, level + (clk->state_nr /
>> 3));
>> @@ -150,12 +147,6 @@ gk20a_pmu_dvfs_work(struct nvkm_alarm *alarm)
>> nvkm_trace(subdev, "utilization = %d %%, avg_load = %d %%\n",
>> utilization, data->avg_load);
>> - ret = gk20a_pmu_dvfs_get_cur_state(pmu, &state);
>> - if (ret) {
>> - nvkm_warn(subdev,...
2017 Mar 05
0
[PATCH 3/9] clk: Make pstate a pointer to nvkm_pstate
...the performance level is directly mapped to pstate */
- level = cur_level = clk->pstate;
+ level = cur_level = clk->pstate->pstate;
if (load > data->p_load_max) {
level = min(clk->state_nr - 1, level + (clk->state_nr / 3));
@@ -142,8 +140,6 @@ gk20a_pmu_dvfs_work(struct nvkm_alarm *alarm)
nvkm_trace(subdev, "utilization = %d %%, avg_load = %d %%\n",
utilization, data->avg_load);
- gk20a_pmu_dvfs_get_cur_state(pmu, &state);
-
if (gk20a_pmu_dvfs_get_target_state(pmu, &state, data->avg_load)) {
nvkm_trace(subdev, "set new state to %d\...
2017 Sep 15
0
[RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate
...the performance level is directly mapped to pstate */
- level = cur_level = clk->pstate;
+ level = cur_level = clk->pstate->pstate;
if (load > data->p_load_max) {
level = min(clk->state_nr - 1, level + (clk->state_nr / 3));
@@ -142,8 +140,6 @@ gk20a_pmu_dvfs_work(struct nvkm_alarm *alarm)
nvkm_trace(subdev, "utilization = %d %%, avg_load = %d %%\n",
utilization, data->avg_load);
- gk20a_pmu_dvfs_get_cur_state(pmu, &state);
-
if (gk20a_pmu_dvfs_get_target_state(pmu, &state, data->avg_load)) {
nvkm_trace(subdev, "set new state to %d\...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...on;
enum nvkm_therm_thrs_state prev_state, new_state;
- int temp = therm->func->temp_get(therm);
+ int temp;
+
+ WARN_ON(nvkm_therm_temp_get(therm, &temp) < 0);
prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name);
@@ -185,7 +189,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)
spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags);
/* schedule the next poll in one second */
- if (therm->func->temp_get(therm) >= 0)
+ if (nvkm_therm_temp_get(therm, NULL) >= 0)
nvkm_timer_alarm(tmr, 1000000000ULL, alarm);
}
@@ -229,7 +233,7 @...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...>temp_get(therm);
> > + int temp;
> > +
> > + WARN_ON(nvkm_therm_temp_get(therm, &temp) < 0);
> >
> > prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name);
> >
> > @@ -185,7 +189,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)
> > spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags);
> >
> > /* schedule the next poll in one second */
> > - if (therm->func->temp_get(therm) >= 0)
> > + if (nvkm_therm_temp_get(therm, NULL) >= 0)...
2017 Sep 15
42
[RFC PATCH 00/29] Current State of my clk patches
Just wanted to post updated versions of my last series/patches. Reviews
welcomed.
It would be also nice if we agree on features I should focus upstreaming, so
that this work can be better splitted or reordered.
Sadly most of my patches depend on the rather big clk subdev rework and I think
those patches shows best, why I think this rework is actually needed and makes
things much easier to add
2017 Jul 21
15
[RFC PATCH 00/13] Thermal throttling
Adds Nouveau controlled thermal throttling for Kepler+ GPUs. With this I feel
safe enough to add support for Maxwell2 reclocking later on (still hidden
behind a switch, but we can be fairly sure to not overheat hardware if a user
isn't carefull enough)
Contains all patches from my clk update series, but I thought it makes sense
to include those in this series as well for completness.
Please
2020 Sep 16
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...- int temp = therm->func->temp_get(therm);
> + int temp;
> +
> + WARN_ON(nvkm_therm_temp_get(therm, &temp) < 0);
>
> prev_state = nvkm_therm_sensor_get_threshold_state(therm, thrs_name);
>
> @@ -185,7 +189,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)
> spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags);
>
> /* schedule the next poll in one second */
> - if (therm->func->temp_get(therm) >= 0)
> + if (nvkm_therm_temp_get(therm, NULL) >= 0)
> nvk...