Skip to contentSkip to conversation

Radeon hwmon driver

DISCUSSION Domenico Andreoli 5 participants 11 messages Feb 7, 2010 – Feb 11, 2010

lore
Share & tools
lore
#0 lore raw

Hi all,

I'd like to write a hwmon driver for the Radeon GPUs. I made a quick
search in the M56 and M76 register references on AMD's site but didn't find anything. I then wrote to [email protected] and now I'm waiting for some response. In the meanwhile, has anybody of you seen anything related to this task while working at the graphic drivers?

Supposing I will find the missing info, I see the first problem. I guess the hwmon registers are in the address space mapped by the DRM driver. Surely I could make a patch but then the radeon's hwmon support would depend on the DRM driver. And if one wants the hwmon support but doesn't want DRM? Would she need/use a different hwmon driver, maybe thank to some Kconfig trick? Any advice?

Regards,
Domenico

-----[ Domenico Andreoli, aka cavok
--[ http://www.dandreoli.com/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--

#1 lore raw
Quoted 8 lines · Domenico Andreoli

Hi all,

 I'd like to write a hwmon driver for the Radeon GPUs. I made a quick search in the M56 and M76 register references on AMD's site but didn't find anything. I then wrote to [email protected] and now I'm waiting for some response. In the meanwhile, has anybody of you seen anything related to this task while working at the graphic drivers?

Quoted 6 lines

Supposing I will find the missing info, I see the first problem. I guess the hwmon registers are in the address space mapped by the DRM driver. Surely I could make a patch but then the radeon's hwmon support would depend on the DRM driver. And if one wants the hwmon support but doesn't want DRM? Would she need/use a different hwmon driver, maybe thank to some Kconfig trick? Any advice?

The thermal and fan chips are generally 3rd party chips connected via i2c. I think most of the chips used have hwmon drivers already. You can look up the chip and i2c address in the power tables in the bios. See the PowerPlayInfo table definitions in atombios.h. I've started work on cleaning up the radeon i2c buses for external use in the drm-radeon-testing branch of Dave's drm tree:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary

Alex

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--

#2 lore raw

[i'm subscribed to this list, thanks]

Quoted 8 lines · Alex Deucher
Quoted 6 lines · Domenico Andreoli

I'd like to write a hwmon driver for the Radeon GPUs. I made a quick search in the M56 and M76 register references on AMD's site but didn't find anything. I then wrote to [email protected] and now I'm waiting for some response. In the meanwhile, has anybody of you seen anything related to this task while working at the graphic drivers?

Quoted 7 lines

The thermal and fan chips are generally 3rd party chips connected via i2c. I think most of the chips used have hwmon drivers already. You can look up the chip and i2c address in the power tables in the bios. See the PowerPlayInfo table definitions in atombios.h. I've started work on cleaning up the radeon i2c buses for external use in the drm-radeon-testing branch of Dave's drm tree:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary

how this tree is managed? reset or rebased at every release?

-----[ Domenico Andreoli, aka cavok
--[ http://www.dandreoli.com/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--

#3 lore raw
Quoted 19 lines · Domenico Andreoli

[i'm subscribed to this list, thanks]

Quoted 8 lines · Alex Deucher
Quoted 6 lines · Domenico Andreoli

I'd like to write a hwmon driver for the Radeon GPUs. I made a quick search in the M56 and M76 register references on AMD's site but didn't find anything. I then wrote to [email protected] and now I'm waiting for some response. In the meanwhile, has anybody of you seen anything related to this task while working at the graphic drivers?

Quoted 7 lines

The thermal and fan chips are generally 3rd party chips connected via i2c.  I think most of the chips used have hwmon drivers already.  You can look up the chip and i2c address in the power tables in the bios. See the PowerPlayInfo table definitions in atombios.h.  I've started work on cleaning up the radeon i2c buses for external use in the drm-radeon-testing branch of Dave's drm tree:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary

Quoted 1 line

how this tree is managed? reset or rebased at every release?

That branch isn't managed that well, its pretty much rebased when I want, its just all the patches that are in flux for 2.6.34. Though nearly everything in there will end up in a form close to that in 2.6.34.

I may squash some commits together to make bisection useful.

Dave.

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--

#4 lore raw
Quoted 20 lines · Dave Airlie
Quoted 19 lines · Domenico Andreoli

[i'm subscribed to this list, thanks]

Quoted 15 lines · Alex Deucher
Quoted 6 lines · Domenico Andreoli

I'd like to write a hwmon driver for the Radeon GPUs. I made a quick search in the M56 and M76 register references on AMD's site but didn't find anything. I then wrote to [email protected] and now I'm waiting for some response. In the meanwhile, has anybody of you seen anything related to this task while working at the graphic drivers?

The thermal and fan chips are generally 3rd party chips connected via i2c.  I think most of the chips used have hwmon drivers already.  You can look up the chip and i2c address in the power tables in the bios. See the PowerPlayInfo table definitions in atombios.h.  I've started work on cleaning up the radeon i2c buses for external use in the drm-radeon-testing branch of Dave's drm tree:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary

Quoted 5 lines
Quoted 1 line

how this tree is managed? reset or rebased at every release?

That branch isn't managed that well, its pretty much rebased when I want, its just all the patches that are in flux for 2.6.34. Though nearly everything in there will end up in a form close to that in 2.6.34.

my habit is to run latest -rc for general testing and bug reporting. if wanted to use this one on a daily basis either I should take it as-is or merge with Linus' one at every -rc, right?

-----[ Domenico Andreoli, aka cavok
--[ http://www.dandreoli.com/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--

#5 lore raw
In reply to Alex Deucher
Quoted 16 lines · Alex Deucher
Quoted 8 lines · Domenico Andreoli

Hi all,

 I'd like to write a hwmon driver for the Radeon GPUs. I made a quick search in the M56 and M76 register references on AMD's site but didn't find anything. I then wrote to [email protected] and now I'm waiting for some response. In the meanwhile, has anybody of you seen anything related to this task while working at the graphic drivers?

Quoted 6 lines

Supposing I will find the missing info, I see the first problem. I guess the hwmon registers are in the address space mapped by the DRM driver. Surely I could make a patch but then the radeon's hwmon support would depend on the DRM driver. And if one wants the hwmon support but doesn't want DRM? Would she need/use a different hwmon driver, maybe thank to some Kconfig trick? Any advice?

Quoted 7 lines

The thermal and fan chips are generally 3rd party chips connected via i2c. I think most of the chips used have hwmon drivers already. You can look up the chip and i2c address in the power tables in the bios. See the PowerPlayInfo table definitions in atombios.h. I've started work on cleaning up the radeon i2c buses for external use in the drm-radeon-testing branch of Dave's drm tree:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary

I have a question: once the i2c cleaning is completed, every known sensor hooked to it is available to the user-space. Would have any sense that I worked on a hwmon wrapper in the kernel? Which duties would still require the mighty kernel?

-----[ Domenico Andreoli, aka cavok
--[ http://www.dandreoli.com/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--

#6 lore raw
Quoted 25 lines · Domenico Andreoli
Quoted 16 lines · Alex Deucher
Quoted 8 lines · Domenico Andreoli

Hi all,

 I'd like to write a hwmon driver for the Radeon GPUs. I made a quick search in the M56 and M76 register references on AMD's site but didn't find anything. I then wrote to [email protected] and now I'm waiting for some response. In the meanwhile, has anybody of you seen anything related to this task while working at the graphic drivers?

Quoted 6 lines

Supposing I will find the missing info, I see the first problem. I guess the hwmon registers are in the address space mapped by the DRM driver. Surely I could make a patch but then the radeon's hwmon support would depend on the DRM driver. And if one wants the hwmon support but doesn't want DRM? Would she need/use a different hwmon driver, maybe thank to some Kconfig trick? Any advice?

Quoted 7 lines

The thermal and fan chips are generally 3rd party chips connected via i2c.  I think most of the chips used have hwmon drivers already.  You can look up the chip and i2c address in the power tables in the bios. See the PowerPlayInfo table definitions in atombios.h.  I've started work on cleaning up the radeon i2c buses for external use in the drm-radeon-testing branch of Dave's drm tree:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary

Quoted 4 lines

I have a question: once the i2c cleaning is completed, every known sensor hooked to it is available to the user-space. Would have any sense that I worked on a hwmon wrapper in the kernel? Which duties would still require the mighty kernel?

You can just load the hwmon driver for the chip in question and interface with it via the hwmon API. It would just be hanging off an i2c bus on the GPU rather than an i2c bus on the motherboard, etc.

Alex

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--

#9 lore raw
In reply to Alex Deucher
Quoted 11 lines · Alex Deucher
Quoted 7 lines · Domenico Andreoli

Hi all,

 I'd like to write a hwmon driver for the Radeon GPUs. I made a quick search in the M56 and M76 register references on AMD's site but didn't find anything. I then wrote to [email protected] and now I'm waiting for some response. In the meanwhile, has anybody of you seen anything related to this task while working at the graphic drivers?

The thermal and fan chips are generally 3rd party chips connected via i2c.

Hi Alex,
AMD GPU clock tool also reports an "Internal TSS", do you have clue on this one?

Luca

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

#10 lore raw
Quoted 10 lines · Luca Tettamanti
Quoted 9 lines · Alex Deucher
Quoted 7 lines · Domenico Andreoli

Hi all,

 I'd like to write a hwmon driver for the Radeon GPUs. I made a quick search in the M56 and M76 register references on AMD's site but didn't find anything. I then wrote to [email protected] and now I'm waiting for some response. In the meanwhile, has anybody of you seen anything related to this task while working at the graphic drivers?

Quoted 5 lines
Quoted 2 lines

The thermal and fan chips are generally 3rd party chips connected via i2c.

Hi Alex,
AMD GPU clock tool also reports an "Internal TSS", do you have clue on this one?

R6xx+ have an internal temperature sensor. It's up to the oem as to whether they use this or an external chip. I haven't had time to dig up the documentation on that yet.

Alex

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--

#7 lore raw
In reply to Alex Deucher
Quoted 26 lines · Alex Deucher
Quoted 25 lines · Domenico Andreoli
Quoted 23 lines · Alex Deucher
Quoted 8 lines · Domenico Andreoli

Hi all,

 I'd like to write a hwmon driver for the Radeon GPUs. I made a quick search in the M56 and M76 register references on AMD's site but didn't find anything. I then wrote to [email protected] and now I'm waiting for some response. In the meanwhile, has anybody of you seen anything related to this task while working at the graphic drivers?

Quoted 6 lines

Supposing I will find the missing info, I see the first problem. I guess the hwmon registers are in the address space mapped by the DRM driver. Surely I could make a patch but then the radeon's hwmon support would depend on the DRM driver. And if one wants the hwmon support but doesn't want DRM? Would she need/use a different hwmon driver, maybe thank to some Kconfig trick? Any advice?

The thermal and fan chips are generally 3rd party chips connected via i2c.  I think most of the chips used have hwmon drivers already.  You can look up the chip and i2c address in the power tables in the bios. See the PowerPlayInfo table definitions in atombios.h.  I've started work on cleaning up the radeon i2c buses for external use in the drm-radeon-testing branch of Dave's drm tree:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary

Quoted 8 lines
Quoted 4 lines

I have a question: once the i2c cleaning is completed, every known sensor hooked to it is available to the user-space. Would have any sense that I worked on a hwmon wrapper in the kernel? Which duties would still require the mighty kernel?

You can just load the hwmon driver for the chip in question and interface with it via the hwmon API.  It would just be hanging off an i2c bus on the GPU rather than an i2c bus on the motherboard,

That's it, nothing special is left to allow the use those i2c sensors from user space, once you finished the cleanup of radeon's i2c. Indeed i2cdetect already sees the newly available i2c buses. If I'm wrong then I am still missing something. Thank you.

-----[ Domenico Andreoli, aka cavok
--[ http://www.dandreoli.com/gpgkey.asc
---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--

#8 lore raw
Quoted 32 lines · Domenico Andreoli
Quoted 31 lines · Alex Deucher
Quoted 29 lines · Domenico Andreoli
Quoted 16 lines · Alex Deucher
Quoted 8 lines · Domenico Andreoli

Hi all,

 I'd like to write a hwmon driver for the Radeon GPUs. I made a quick search in the M56 and M76 register references on AMD's site but didn't find anything. I then wrote to [email protected] and now I'm waiting for some response. In the meanwhile, has anybody of you seen anything related to this task while working at the graphic drivers?

Quoted 6 lines

Supposing I will find the missing info, I see the first problem. I guess the hwmon registers are in the address space mapped by the DRM driver. Surely I could make a patch but then the radeon's hwmon support would depend on the DRM driver. And if one wants the hwmon support but doesn't want DRM? Would she need/use a different hwmon driver, maybe thank to some Kconfig trick? Any advice?

Quoted 7 lines

The thermal and fan chips are generally 3rd party chips connected via i2c.  I think most of the chips used have hwmon drivers already.  You can look up the chip and i2c address in the power tables in the bios. See the PowerPlayInfo table definitions in atombios.h.  I've started work on cleaning up the radeon i2c buses for external use in the drm-radeon-testing branch of Dave's drm tree:
http://git.kernel.org/?p=linux/kernel/git/airlied/drm-2.6.git;a=summary

I have a question: once the i2c cleaning is completed, every known sensor hooked to it is available to the user-space. Would have any sense that I worked on a hwmon wrapper in the kernel? Which duties would still require the mighty kernel?

Quoted 9 lines
Quoted 3 lines

You can just load the hwmon driver for the chip in question and interface with it via the hwmon API.  It would just be hanging off an i2c bus on the GPU rather than an i2c bus on the motherboard,

That's it, nothing special is left to allow the use those i2c sensors from user space, once you finished the cleanup of radeon's i2c. Indeed i2cdetect already sees the newly available i2c buses. If I'm wrong then I am still missing something. Thank you.

That should be it.

Alex

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--