Re: [PATCH] k10temp support for AMD Ryzen w/ Vega gfx

2018-03-06 Thread René Rebe
Hi,

On 06 Mar 2018, at 11:06, Guenter Roeck  wrote:

> On 03/05/2018 10:48 PM, René Rebe wrote:
>> Hi,
>> On 06 Mar 2018, at 00:03, Guenter Roeck > > wrote:
>>> On Mon, Mar 05, 2018 at 11:38:24PM +0100, René Rebe wrote:
 Hi,
 
 This enables k10temp for the new AMD Ryzen APUs w/ Vega Mobile Gfx.
 Tested on Ryzen 5 2500U, the temperature looked plausible.
 
  Signed-off-by: René Rebe >
 
 PS: 1st RFC - might get white-space damaged, will resend when ACKed.
 Sorry my Xemacs/Mew broke.
 
 --- linux-4.15/drivers/hwmon/k10temp.c.vanilla2018-03-05 
 22:22:30.974331180 +
 +++ linux-4.15/drivers/hwmon/k10temp.c2018-03-05 22:24:17.186327291 +
 @@ -40,6 +40,10 @@
 #define PCI_DEVICE_ID_AMD_17H_DF_F30x1463
 #endif
 
 +#ifndef PCI_DEVICE_ID_AMD_17H_RR_NB
 +#define PCI_DEVICE_ID_AMD_17H_RR_NB0x15d0
 +#endif
 +
 /* CPUID function 0x8001, ebx */
 #define CPUID_PKGTYPE_MASK0xf000
 #define CPUID_PKGTYPE_F0x
 @@ -89,6 +93,8 @@
 { 0x17, "AMD Ryzen Threadripper 1950", 1 },
 { 0x17, "AMD Ryzen Threadripper 1920", 1 },
 { 0x17, "AMD Ryzen Threadripper 1910", 1 },
 +{ 0x17, "AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx", 2 },
 +{ 0x17, "AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx", 2 },
>>> 
>>> Do you have a confirmation that the temperature offset is correct ?
>> I tried all of the three currently used offsets and this was looked the most 
>> plausible.
>> For me having some indication of temperature is better than having none at 
>> all.
>> Maybe some contact at AMD can shed some light on it, too?
> 
> Per the information I got (not from AMD), those CPUs are not supposed to have 
> an offset.
> 
> Does the system have a Super-IO chip ? If so, what temperature does it report 
> ?
> Also, what temperatures do you see with 0 offset ?

hm, interesting – as other Ryzens were marked with this offsets I did not 
imagine the mobile ones would have none, …

Without offset it would mean the ideapad 720s would idle after fresh boot in a 
(really) cold room at a little over 40°C.
The machine does not feel that warm, but maybe it is under the heatsink (my 
boot w/ full-disk encryption takes a bit)?

Should I resend the patch without the offsets as baseline for other users to 
test? Without the chipset PCI ID it obviously currently does not match on those 
new mobile machines, ...

René

-- 
 ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
 http://exactcode.com | http://exactscan.com | http://ocrkit.com | 
http://t2-project.org | http://rene.rebe.de



Re: [PATCH] k10temp support for AMD Ryzen w/ Vega gfx

2018-03-06 Thread René Rebe
Hi,

On 06 Mar 2018, at 11:06, Guenter Roeck  wrote:

> On 03/05/2018 10:48 PM, René Rebe wrote:
>> Hi,
>> On 06 Mar 2018, at 00:03, Guenter Roeck > > wrote:
>>> On Mon, Mar 05, 2018 at 11:38:24PM +0100, René Rebe wrote:
 Hi,
 
 This enables k10temp for the new AMD Ryzen APUs w/ Vega Mobile Gfx.
 Tested on Ryzen 5 2500U, the temperature looked plausible.
 
  Signed-off-by: René Rebe mailto:r...@exactcode.de>>
 
 PS: 1st RFC - might get white-space damaged, will resend when ACKed.
 Sorry my Xemacs/Mew broke.
 
 --- linux-4.15/drivers/hwmon/k10temp.c.vanilla2018-03-05 
 22:22:30.974331180 +
 +++ linux-4.15/drivers/hwmon/k10temp.c2018-03-05 22:24:17.186327291 +
 @@ -40,6 +40,10 @@
 #define PCI_DEVICE_ID_AMD_17H_DF_F30x1463
 #endif
 
 +#ifndef PCI_DEVICE_ID_AMD_17H_RR_NB
 +#define PCI_DEVICE_ID_AMD_17H_RR_NB0x15d0
 +#endif
 +
 /* CPUID function 0x8001, ebx */
 #define CPUID_PKGTYPE_MASK0xf000
 #define CPUID_PKGTYPE_F0x
 @@ -89,6 +93,8 @@
 { 0x17, "AMD Ryzen Threadripper 1950", 1 },
 { 0x17, "AMD Ryzen Threadripper 1920", 1 },
 { 0x17, "AMD Ryzen Threadripper 1910", 1 },
 +{ 0x17, "AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx", 2 },
 +{ 0x17, "AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx", 2 },
>>> 
>>> Do you have a confirmation that the temperature offset is correct ?
>> I tried all of the three currently used offsets and this was looked the most 
>> plausible.
>> For me having some indication of temperature is better than having none at 
>> all.
>> Maybe some contact at AMD can shed some light on it, too?
> 
> Per the information I got (not from AMD), those CPUs are not supposed to have 
> an offset.
> 
> Does the system have a Super-IO chip ? If so, what temperature does it report 
> ?
> Also, what temperatures do you see with 0 offset ?

hm, interesting – as other Ryzens were marked with this offsets I did not 
imagine the mobile ones would have none, …

Without offset it would mean the ideapad 720s would idle after fresh boot in a 
(really) cold room at a little over 40°C.
The machine does not feel that warm, but maybe it is under the heatsink (my 
boot w/ full-disk encryption takes a bit)?

Should I resend the patch without the offsets as baseline for other users to 
test? Without the chipset PCI ID it obviously currently does not match on those 
new mobile machines, ...

René

-- 
 ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
 http://exactcode.com | http://exactscan.com | http://ocrkit.com | 
http://t2-project.org | http://rene.rebe.de



Re: [PATCH] k10temp support for AMD Ryzen w/ Vega gfx

2018-03-06 Thread Guenter Roeck

On 03/05/2018 10:48 PM, René Rebe wrote:

Hi,

On 06 Mar 2018, at 00:03, Guenter Roeck > wrote:


On Mon, Mar 05, 2018 at 11:38:24PM +0100, René Rebe wrote:

Hi,

This enables k10temp for the new AMD Ryzen APUs w/ Vega Mobile Gfx.
Tested on Ryzen 5 2500U, the temperature looked plausible.

 Signed-off-by: René Rebe >

PS: 1st RFC - might get white-space damaged, will resend when ACKed.
Sorry my Xemacs/Mew broke.

--- linux-4.15/drivers/hwmon/k10temp.c.vanilla2018-03-05 22:22:30.974331180 
+
+++ linux-4.15/drivers/hwmon/k10temp.c2018-03-05 22:24:17.186327291 +
@@ -40,6 +40,10 @@
#define PCI_DEVICE_ID_AMD_17H_DF_F30x1463
#endif

+#ifndef PCI_DEVICE_ID_AMD_17H_RR_NB
+#define PCI_DEVICE_ID_AMD_17H_RR_NB0x15d0
+#endif
+
/* CPUID function 0x8001, ebx */
#define CPUID_PKGTYPE_MASK0xf000
#define CPUID_PKGTYPE_F0x
@@ -89,6 +93,8 @@
{ 0x17, "AMD Ryzen Threadripper 1950", 1 },
{ 0x17, "AMD Ryzen Threadripper 1920", 1 },
{ 0x17, "AMD Ryzen Threadripper 1910", 1 },
+{ 0x17, "AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx", 2 },
+{ 0x17, "AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx", 2 },


Do you have a confirmation that the temperature offset is correct ?


I tried all of the three currently used offsets and this was looked the most 
plausible.
For me having some indication of temperature is better than having none at all.
Maybe some contact at AMD can shed some light on it, too?



Per the information I got (not from AMD), those CPUs are not supposed to have 
an offset.

Does the system have a Super-IO chip ? If so, what temperature does it report ?
Also, what temperatures do you see with 0 offset ?

Thanks,
Guenter


Thanks,
Guenter


};

static void read_tempreg_pci(struct pci_dev *pdev, u32 *regval)
@@ -289,6 +2944,7 @@
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
+{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_RR_NB) },
{}
};
MODULE_DEVICE_TABLE(pci, k10temp_id_table);

--
ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
http://exactcode.com | http://exactscan.com | http://ocrkit.com | 
http://t2-project.org | http://rene.rebe.de
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majord...@vger.kernel.org 

More majordomo info at http://vger.kernel.org/majordomo-info.html


--
  ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
http://exactcode.com  | http://exactscan.com  
| http://ocrkit.com  | http://t2-project.org  | 
http://rene.rebe.de





Re: [PATCH] k10temp support for AMD Ryzen w/ Vega gfx

2018-03-06 Thread Guenter Roeck

On 03/05/2018 10:48 PM, René Rebe wrote:

Hi,

On 06 Mar 2018, at 00:03, Guenter Roeck mailto:li...@roeck-us.net>> wrote:


On Mon, Mar 05, 2018 at 11:38:24PM +0100, René Rebe wrote:

Hi,

This enables k10temp for the new AMD Ryzen APUs w/ Vega Mobile Gfx.
Tested on Ryzen 5 2500U, the temperature looked plausible.

 Signed-off-by: René Rebe mailto:r...@exactcode.de>>

PS: 1st RFC - might get white-space damaged, will resend when ACKed.
Sorry my Xemacs/Mew broke.

--- linux-4.15/drivers/hwmon/k10temp.c.vanilla2018-03-05 22:22:30.974331180 
+
+++ linux-4.15/drivers/hwmon/k10temp.c2018-03-05 22:24:17.186327291 +
@@ -40,6 +40,10 @@
#define PCI_DEVICE_ID_AMD_17H_DF_F30x1463
#endif

+#ifndef PCI_DEVICE_ID_AMD_17H_RR_NB
+#define PCI_DEVICE_ID_AMD_17H_RR_NB0x15d0
+#endif
+
/* CPUID function 0x8001, ebx */
#define CPUID_PKGTYPE_MASK0xf000
#define CPUID_PKGTYPE_F0x
@@ -89,6 +93,8 @@
{ 0x17, "AMD Ryzen Threadripper 1950", 1 },
{ 0x17, "AMD Ryzen Threadripper 1920", 1 },
{ 0x17, "AMD Ryzen Threadripper 1910", 1 },
+{ 0x17, "AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx", 2 },
+{ 0x17, "AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx", 2 },


Do you have a confirmation that the temperature offset is correct ?


I tried all of the three currently used offsets and this was looked the most 
plausible.
For me having some indication of temperature is better than having none at all.
Maybe some contact at AMD can shed some light on it, too?



Per the information I got (not from AMD), those CPUs are not supposed to have 
an offset.

Does the system have a Super-IO chip ? If so, what temperature does it report ?
Also, what temperatures do you see with 0 offset ?

Thanks,
Guenter


Thanks,
Guenter


};

static void read_tempreg_pci(struct pci_dev *pdev, u32 *regval)
@@ -289,6 +2944,7 @@
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
+{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_RR_NB) },
{}
};
MODULE_DEVICE_TABLE(pci, k10temp_id_table);

--
ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
http://exactcode.com | http://exactscan.com | http://ocrkit.com | 
http://t2-project.org | http://rene.rebe.de
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majord...@vger.kernel.org 

More majordomo info at http://vger.kernel.org/majordomo-info.html


--
  ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
http://exactcode.com  | http://exactscan.com  
| http://ocrkit.com  | http://t2-project.org  | 
http://rene.rebe.de





Re: [PATCH] k10temp support for AMD Ryzen w/ Vega gfx

2018-03-05 Thread Guenter Roeck
On Mon, Mar 05, 2018 at 11:38:24PM +0100, René Rebe wrote:
> Hi,
> 
> This enables k10temp for the new AMD Ryzen APUs w/ Vega Mobile Gfx.
> Tested on Ryzen 5 2500U, the temperature looked plausible.
> 
>   Signed-off-by: René Rebe 
> 
> PS: 1st RFC - might get white-space damaged, will resend when ACKed.
> Sorry my Xemacs/Mew broke.
> 
> --- linux-4.15/drivers/hwmon/k10temp.c.vanilla2018-03-05 
> 22:22:30.974331180 +
> +++ linux-4.15/drivers/hwmon/k10temp.c2018-03-05 22:24:17.186327291 
> +
> @@ -40,6 +40,10 @@
>  #define PCI_DEVICE_ID_AMD_17H_DF_F3  0x1463
>  #endif
>  
> +#ifndef PCI_DEVICE_ID_AMD_17H_RR_NB
> +#define PCI_DEVICE_ID_AMD_17H_RR_NB  0x15d0
> +#endif
> +
>  /* CPUID function 0x8001, ebx */
>  #define CPUID_PKGTYPE_MASK   0xf000
>  #define CPUID_PKGTYPE_F  0x
> @@ -89,6 +93,8 @@
>   { 0x17, "AMD Ryzen Threadripper 1950", 1 },
>   { 0x17, "AMD Ryzen Threadripper 1920", 1 },
>   { 0x17, "AMD Ryzen Threadripper 1910", 1 },
> + { 0x17, "AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx", 2 },
> + { 0x17, "AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx", 2 },

Do you have a confirmation that the temperature offset is correct ?

Thanks,
Guenter

>  };
>  
>  static void read_tempreg_pci(struct pci_dev *pdev, u32 *regval)
> @@ -289,6 +2944,7 @@
>   { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
>   { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
>   { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
> + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_RR_NB) },
>   {}
>  };
>  MODULE_DEVICE_TABLE(pci, k10temp_id_table);
> 
> -- 
>  ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
>  http://exactcode.com | http://exactscan.com | http://ocrkit.com | 
> http://t2-project.org | http://rene.rebe.de
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] k10temp support for AMD Ryzen w/ Vega gfx

2018-03-05 Thread Guenter Roeck
On Mon, Mar 05, 2018 at 11:38:24PM +0100, René Rebe wrote:
> Hi,
> 
> This enables k10temp for the new AMD Ryzen APUs w/ Vega Mobile Gfx.
> Tested on Ryzen 5 2500U, the temperature looked plausible.
> 
>   Signed-off-by: René Rebe 
> 
> PS: 1st RFC - might get white-space damaged, will resend when ACKed.
> Sorry my Xemacs/Mew broke.
> 
> --- linux-4.15/drivers/hwmon/k10temp.c.vanilla2018-03-05 
> 22:22:30.974331180 +
> +++ linux-4.15/drivers/hwmon/k10temp.c2018-03-05 22:24:17.186327291 
> +
> @@ -40,6 +40,10 @@
>  #define PCI_DEVICE_ID_AMD_17H_DF_F3  0x1463
>  #endif
>  
> +#ifndef PCI_DEVICE_ID_AMD_17H_RR_NB
> +#define PCI_DEVICE_ID_AMD_17H_RR_NB  0x15d0
> +#endif
> +
>  /* CPUID function 0x8001, ebx */
>  #define CPUID_PKGTYPE_MASK   0xf000
>  #define CPUID_PKGTYPE_F  0x
> @@ -89,6 +93,8 @@
>   { 0x17, "AMD Ryzen Threadripper 1950", 1 },
>   { 0x17, "AMD Ryzen Threadripper 1920", 1 },
>   { 0x17, "AMD Ryzen Threadripper 1910", 1 },
> + { 0x17, "AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx", 2 },
> + { 0x17, "AMD Ryzen 7 2700U with Radeon Vega Mobile Gfx", 2 },

Do you have a confirmation that the temperature offset is correct ?

Thanks,
Guenter

>  };
>  
>  static void read_tempreg_pci(struct pci_dev *pdev, u32 *regval)
> @@ -289,6 +2944,7 @@
>   { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
>   { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
>   { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
> + { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_RR_NB) },
>   {}
>  };
>  MODULE_DEVICE_TABLE(pci, k10temp_id_table);
> 
> -- 
>  ExactCODE GmbH, Lietzenburger Str. 42, DE-10789 Berlin
>  http://exactcode.com | http://exactscan.com | http://ocrkit.com | 
> http://t2-project.org | http://rene.rebe.de
> --
> To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html