Bug 11329

Summary: Incorrect value in /sys/devices/platform/w83627hf.656/cpu0_vid
Product: Drivers Reporter: Jean-Luc Coulon (jean.luc.coulon)
Component: Hardware MonitoringAssignee: Jean Delvare (jdelvare)
Status: CLOSED CODE_FIX    
Severity: normal CC: bunk, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27-rc3 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 11167    
Attachments: output of cpuid command
/prot/cpuinfo
output of lspci -vv
isadump -y -k 0x87,0x87 0x2e 0x2f 7
Fix AMD K8 VID decoding
Fix AMD K8 VID decoding (v2)
Fix AMD K8 VID decoding (v3)

Description Jean-Luc Coulon 2008-08-14 02:58:20 UTC
Latest working kernel version: 2.6.27-rc2-git1
Earliest failing kernel version: 2.6.27-rc2-git2
Distribution: Debian Sid
Hardware Environment: Athlon 64 x2 4200+
Software Environment: X86_64
Problem Description: in git1 and previous, cpu0_vid is reported as 1475 (which is correct). Since git2, it is reported as 725

Steps to reproduce: see in /sys/devices/platform/w83627hf.656/cpu0_vid

According to this value, the sensors command reports ccpu0_vid as +0.725V

This problem occurs in rc2-git2 and was not present in rc2-git1, it is still present in rc3-git1

Regards

Jean-Luc
Comment 1 Jean Delvare 2008-08-14 03:50:28 UTC
Thanks for reporting. This must be a side effect of that change:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=116d0486bdefc11f71e567cadf0c47f788b4dd06

The change added support for 6-bit VID codes for the AMD. Apparently in your case it broke the support for 5-bit VID codes as a side effect.

Please attach the contents of /proc/cpuid.

What exact Super-I/O chip model does your motherboard have? /sys/devices/platform/w83627hf.656/name should tell.
Comment 2 Jean-Luc Coulon 2008-08-14 04:31:33 UTC
Created attachment 17239 [details]
output of cpuid command
Comment 3 Jean-Luc Coulon 2008-08-14 04:32:23 UTC
Created attachment 17240 [details]
/prot/cpuinfo
Comment 4 Jean-Luc Coulon 2008-08-14 04:43:59 UTC
Created attachment 17241 [details]
output of lspci -vv

The chipset is VIA K8T800pro
The host brisge is a VT8237


J-L
Comment 5 Jean Delvare 2008-08-14 04:50:18 UTC
The north and south bridges don't matter much here. What I need to know is the Super-I/O model. The w83627hf driver should tell you when you load it, and you can also read the name from /sys/devices/platform/w83627hf.656/name.
Comment 6 Jean-Luc Coulon 2008-08-14 05:53:41 UTC
Sorry,

This is w83627thf
Comment 7 Jean Delvare 2008-08-14 07:33:11 UTC
The W83627THF is a bit special, as it doesn't have dedicated VID inputs. The driver assumes that pins GP50 to GP56 are used as VID inputs, because that's what the demo circuit has in the datasheet, and several boards actually use this wiring. However, this is only a guess, and it might not work properly on all boards. This is fragile too, which might explain why a change in the handling of the AMD VID values has broken support of your motherboard.

To go on with the investigation, I need to know the value of a few register values. Please provide the output of the following command:

isadump -y -k 0x87,0x87 0x2e 0x2f 7

If it returns only 0xffs, please try instead:

isadump -y -k 0x87,0x87 0x4e 0x4f 7
Comment 8 Jean-Luc Coulon 2008-08-14 07:37:16 UTC
Created attachment 17242 [details]
isadump -y -k 0x87,0x87 0x2e 0x2f 7 

Output of isadump -y -k 0x87,0x87 0x2e 0x2f 7 is attached

J-L
Comment 9 Jean Delvare 2008-08-14 09:47:09 UTC
Created attachment 17246 [details]
Fix AMD K8 VID decoding

Can you please test this patch?
Comment 10 Jean-Luc Coulon 2008-08-14 10:41:32 UTC
Tested, it doesnt fiw the problem.

J-L
Comment 11 Jean Delvare 2008-08-14 10:59:14 UTC
Created attachment 17248 [details]
Fix AMD K8 VID decoding (v2)

I had forgotten one change. Please try this second patch.
Comment 12 Jean-Luc Coulon 2008-08-14 11:28:12 UTC
Tested.
It works for me [tm]

Thanks
J-L
Comment 13 Adrian Bunk 2008-08-14 12:46:07 UTC
Handled-By      : Jean Delvare <khali@linux-fr.org>
Patch           : http://bugzilla.kernel.org/attachment.cgi?id=17248
Comment 14 Jean Delvare 2008-08-15 01:54:57 UTC
Created attachment 17260 [details]
Fix AMD K8 VID decoding (v3)

Updated patch with additional technical documentation references.
Comment 15 Adrian Bunk 2008-08-15 12:16:39 UTC
fixed by commit cebd7709d396b59ff53b95fa3c4d9febbd4c010f