Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-08-03 12:45:42 +0200
committerTakashi Iwai <tiwai@suse.de>2018-08-03 12:45:42 +0200
commit57c6620605962cc8b8d3516672427d17d72536c0 (patch)
tree330ab1d0634fcd46a540992d87250487ed99f0ff
parent38db573b31d17aa043c548ec7851691896691ec7 (diff)
Revert "drm/nouveau/drm/therm/fan: add a fallback if no fan
control is specified in the vbios" (bsc#1103356). suse-commit: 23b40eca6fc7df3a8ab9d7ad66e2f0422eae41b1
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c
index 952a7cb0a59a..f4c24105b62e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c
@@ -64,9 +64,10 @@ nvkm_therm_update_trip(struct nvkm_therm *therm)
}
static int
-nvkm_therm_compute_linear_duty(struct nvkm_therm *therm, u8 linear_min_temp,
- u8 linear_max_temp)
+nvkm_therm_update_linear(struct nvkm_therm *therm)
{
+ u8 linear_min_temp = therm->fan->bios.linear_min_temp;
+ u8 linear_max_temp = therm->fan->bios.linear_max_temp;
u8 temp = therm->func->temp_get(therm);
u16 duty;
@@ -84,21 +85,6 @@ nvkm_therm_compute_linear_duty(struct nvkm_therm *therm, u8 linear_min_temp,
return duty;
}
-static int
-nvkm_therm_update_linear(struct nvkm_therm *therm)
-{
- u8 min = therm->fan->bios.linear_min_temp;
- u8 max = therm->fan->bios.linear_max_temp;
- return nvkm_therm_compute_linear_duty(therm, min, max);
-}
-
-static int
-nvkm_therm_update_linear_fallback(struct nvkm_therm *therm)
-{
- u8 max = therm->bios_sensor.thrs_fan_boost.temp;
- return nvkm_therm_compute_linear_duty(therm, 30, max);
-}
-
static void
nvkm_therm_update(struct nvkm_therm *therm, int mode)
{
@@ -133,8 +119,6 @@ nvkm_therm_update(struct nvkm_therm *therm, int mode)
case NVBIOS_THERM_FAN_OTHER:
if (therm->cstate)
duty = therm->cstate;
- else
- duty = nvkm_therm_update_linear_fallback(therm);
poll = false;
break;
}