From: Alexander Goomenyuk <emerg.reanimator@gmail.com>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH] radeonfb: Let hwmon driver probe the "monid" I2C bus
Date: Wed, 02 Feb 2011 05:50:16 +0000 [thread overview]
Message-ID: <1296625816.8818.19.camel@home-fx60> (raw)
In-Reply-To: <20110111162352.5a634e9e@endymion.delvare>
On Thu, 2011-01-13 at 14:44 +1000, Dave Airlie wrote:
> On Thu, Jan 13, 2011 at 2:11 PM, Paul Mundt <lethal@linux-sh.org> wrote:
> > On Tue, Jan 11, 2011 at 04:23:52PM +0100, Jean Delvare wrote:
> >> Some Radeon cards have an I2C-based thermal sensor chip connected to
> >> the "monid" I2C bus. Set the I2C probing class of this bus properly so
> >> that hwmon drivers can detect devices on it and bind to them.
> >>
> >> This closes kernel.org bug #26172.
> >>
>
> The radeon BIOS actually contains a table to tell us what chip is on the bus,
> in the KMS driver we read this table and load the appropriate hwmon device,
>
> There could possibly be other things on this bus than hw monitor devices.
>
> Though radeonfb should be considered mostly dead.
>
> Dave.
I have tried radeon KMS driver.
modinfo output:
filename: /lib/modules/2.6.36-tuxonice-r3/kernel/drivers/gpu/drm/radeon/radeon.ko
depends:
drm,drm_kms_helper,ttm,fb,i2c-core,cfbfillrect,cfbimgblt,cfbcopyarea,i2c-algo-bit
vermagic: 2.6.36-tuxonice-r3 SMP mod_unload 686
parm: no_wb:Disable AGP writeback for scratch
registers (int)
parm: modeset:Disable/Enable modesetting (int)
parm: dynclks:Disable/Enable dynamic clocks (int)
parm: r4xx_atom:Enable ATOMBIOS modesetting for R4xx
(int)
parm: vramlimit:Restrict VRAM for testing (int)
parm: agpmode:AGP Mode (-1 = PCI) (int)
parm: gartsize:Size of PCIE/IGP gart to setup in
megabytes (32,64, etc)
(int)
parm: benchmark:Run benchmark (int)
parm: test:Run tests (int)
parm: connector_table:Force connector table (int)
parm: tv:TV enable (0 = disable) (int)
parm: new_pll:Select new PLL code (int)
parm: audio:Audio enable (0 = disable) (int)
parm: disp_priority:Display Priority (0 = auto, 1 normal, 2 = high) (int)
parm: hw_i2c:hw i2c engine enable (0 = disable) (int)
But it also need modifications in order to be used by lm63 hwmon driver.
1. MONID line is disable by combios_setup_i2c_bus() for RV380 because
of:
case CHIP_RV350:
case CHIP_RV380:
case CHIP_RS400:
case CHIP_RS480:
switch (ddc_line) {
case RADEON_GPIO_VGA_DDC:
case RADEON_GPIO_DVI_DDC:
+ i2c.hw_capable = true;
- i2c.hw_capable = false;
break;
case RADEON_GPIO_MONID:
/* hw i2c on RADEON_GPIO_MONID doesn't seem to work
* reliably on some pre-r4xx hardware; not sure why
*/
i2c.hw_capable = true;
break;
extracted from the sources.
It would be nice if there will be some driver parameter to control this
behavior. Or/and control it in kernel configuration menu.
2. MONID adapter is not registered as HWMON capable.
So I have added the following line into radeon_combios_i2c_init():
} else if (rdev->family >= CHIP_R300) {
i2c = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0);
rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID");
+ rdev->i2c_bus[3]->adapter.class = I2C_CLASS_HWMON;
Now I see GPU temperature using lm_sensors.
P.S. There is also strange side effect after reloading radeon driver
from X console: the screen switch off. So I have to switch between
virtual console and X. Is it an bug?
next prev parent reply other threads:[~2011-02-02 5:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-11 15:23 [PATCH] radeonfb: Let hwmon driver probe the "monid" I2C bus Jean Delvare
2011-01-13 4:11 ` Paul Mundt
2011-01-13 4:44 ` Dave Airlie
2011-01-13 4:50 ` Benjamin Herrenschmidt
2011-01-13 8:22 ` Jean Delvare
2011-01-13 8:56 ` Jean Delvare
2011-02-02 5:50 ` Alexander Goomenyuk [this message]
2011-02-02 8:11 ` Jean Delvare
2011-02-02 8:12 ` Jean Delvare
2011-02-02 9:51 ` Benjamin Herrenschmidt
2011-02-02 10:00 ` Michel Dänzer
2011-02-03 5:41 ` Alexander Goomenyuk
2011-02-03 8:04 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296625816.8818.19.camel@home-fx60 \
--to=emerg.reanimator@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.