change temp sensor defaults to neutral ones
Subsystems (3)
PATCH 1/1 change temp sensor defaults to neutral ones
The attached patch deletes some defaults which are not really defaults and changes the standard values to calculation neutral ones.
I discussed the matter with mupuf on irc and we agreed on this solution.
--lynxeye
From c64c67a8abcf03c58442999399874182bc6540a4 Mon Sep 17 00:00:00 2001
From: Lucas Stach <[email protected]>
Date: Wed, 5 Jan 2011 22:41:24 +0100
Subject: [PATCH 1/2] drm/nouveau: change temp sensor defaults to neutral ones
The hardcoded slope and offset defaults in nouveau are not really defaults, as they are retrieved from some random vbioses. So they are likely wrong for anything except the cards with this particular vbios.
I checked about 30 vbioses across card generations and couldn't find one without either slope and offset or offset_constant set, so i think it should be ok to remove this crude values and just init slope and offset with some neutral defaults.
--- drivers/gpu/drm/nouveau/nouveau_temp.c | 50 +------------------------------- 1 files changed, 1 insertions(+), 49 deletions(-)
drivers/gpu/drm/nouveau/nouveau_temp.c +1 -49
@@ -43,7 +43,7 @@ nouveau_temp_vbios_parse(struct drm_device *dev, u8 *temp)/* Set the default sensor's contants */ sensor->offset_constant =0 ; - sensor->offset_mult =1 ; + sensor->offset_mult =0 ; sensor->offset_div =1 ; sensor->slope_mult =1 ; sensor->slope_div =1 ;
@@ -53,54 +53,6 @@ nouveau_temp_vbios_parse(struct drm_device *dev, u8 *temp) temps->down_clock =100 ; temps->fan_boost =90 ; -/* Set the known default values to setup the temperature sensor */ -if (dev_priv->card_type >=NV_40 ) { -switch (dev_priv->chipset) { -case 0x43 : - sensor->offset_mult =32060 ; - sensor->offset_div =1000 ; - sensor->slope_mult =792 ; - sensor->slope_div =1000 ; -break ; - -case 0x44 : -case 0x47 : -case 0x4a : - sensor->offset_mult =27839 ; - sensor->offset_div =1000 ; - sensor->slope_mult =780 ; - sensor->slope_div =1000 ; -break ; - -case 0x46 : - sensor->offset_mult =-24775 ; - sensor->offset_div =100 ; - sensor->slope_mult =467 ; - sensor->slope_div =10000 ; -break ; - -case 0x49 : - sensor->offset_mult =-25051 ; - sensor->offset_div =100 ; - sensor->slope_mult =458 ; - sensor->slope_div =10000 ; -break ; - -case 0x4b : - sensor->offset_mult =-24088 ; - sensor->offset_div =100 ; - sensor->slope_mult =442 ; - sensor->slope_div =10000 ; -break ; - -case 0x50 : - sensor->offset_mult =-22749 ; - sensor->offset_div =100 ; - sensor->slope_mult =431 ; - sensor->slope_div =10000 ; -break ; - } - } headerlen = temp[1 ]; recordlen = temp[2 ];
Signature · 1 line
1.7.3.4
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
Quoted 4 lines · Lucas Stach
The attached patch deletes some defaults which are not really defaults and changes the standard values to calculation neutral ones.
I discussed the matter with mupuf on irc and we agreed on this solution.
Thanks, pushed.
Ben.
Quoted 6 lines
--lynxeye
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
Quoted 5 lines · Lucas Stach
The attached patch deletes some defaults which are not really defaults and changes the standard values to calculation neutral ones.
I discussed the matter with mupuf on irc and we agreed on this solution.
Hi, I'm attaching the BIOS dump from an nv4a card that needs these sensor defaults (IIRC it's missing the temperature offset/slope entries).
Quoted 6 lines
--lynxeye
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau