2010/1/27 Michel Dänzer <mic...@daenzer.net>: > On Wed, 2010-01-27 at 10:30 -0500, Alex Deucher wrote: >> 2010/1/27 Michel Dänzer <mic...@daenzer.net>: >> > >> > your commit 8131660130d3dc2629a150d47e6a04c8a1a6244b ('drm/radeon/kms: >> > add support for hw i2c on r1xx-r5xx') breaks LVDS on my PowerBook. It >> > looks kinda like blooming, though I can actually make out a higly >> > distorted part of what it's supposed to display, and there's a >> > panel/backlight blinking around every second or so. >> > >> >> Hmm, maybe the mac's edid is wired up such that hw i2c doesn't work or >> the prescale calculation for your system needs adjusting. Switching >> back to sw i2c should fix it in the meantime. Set the hw_capable bool >> in the radeon_i2c_bus_rec struct to false. > > Presumably that would work, as the previous commit ('drm/radeon/kms: add > radeon i2c algo') works? [0] > >> For the prescale: >> u32 prescale = (((rdev->clock.default_sclk * 10)/(4 * 128 * 100) + 1) >> << 8) + 128; >> does rdev->clock.default_sclk get initialized properly on the mac? If >> not, you can use radeon_get_engine_clock to read back the value from >> the regs. > > Looks like it in /sys/kernel/debug/dri/0/radeon_pm_info: > > state: PM_STATE_DISABLED > default engine clock: 445500 kHz > current engine clock: 445500 kHz > default memory clock: 240750 kHz > current memory clock: 240750 kHz >
you could also try the prescale algo from r520: i2c_clock = 50; prescale = (127 << 8) + ((rdev->clock.default_sclk * 10) / (4 * 127 * i2c_clock)); > > [0] Though actually I notice there's a warning in dmesg with that as > well: hmmm, I'll take a look. > > [ 0.355965] [drm] TV1: INTERNAL_DAC2 > [ 0.356037] > [ 0.356040] ============================================= > [ 0.356072] [ INFO: possible recursive locking detected ] > [ 0.356096] 2.6.32.6 #434 > [ 0.356112] --------------------------------------------- > [ 0.356136] swapper/1 is trying to acquire lock: > [ 0.356158] (&adap->bus_lock){+.+...}, at: [<c0355910>] > i2c_transfer+0x84/0x178 > [ 0.356219] > [ 0.356221] but task is already holding lock: > [ 0.356249] (&adap->bus_lock){+.+...}, at: [<c0355910>] > i2c_transfer+0x84/0x178 > [ 0.356294] > [ 0.356296] other info that might help us debug this: > [ 0.356328] 1 lock held by swapper/1: > [ 0.356346] #0: (&adap->bus_lock){+.+...}, at: [<c0355910>] > i2c_transfer+0x84/0x178 > [ 0.356396] > [ 0.356397] stack backtrace: > [ 0.356422] Call Trace: > [ 0.356447] [ef871b50] [c00094fc] show_stack+0x7c/0x194 (unreliable) > [ 0.356485] [ef871b90] [c007ebe4] __lock_acquire+0x15c0/0x16a8 > [ 0.356515] [ef871c20] [c007edb8] lock_acquire+0xec/0x128 > [ 0.356549] [ef871c60] [c040bfa4] mutex_lock_nested+0x5c/0x2c8 > [ 0.356580] [ef871cc0] [c0355910] i2c_transfer+0x84/0x178 > [ 0.356612] [ef871cf0] [c02aa56c] radeon_i2c_xfer+0x44/0x80 > [ 0.356643] [ef871d10] [c0355938] i2c_transfer+0xac/0x178 > [ 0.356679] [ef871d40] [c026267c] drm_do_probe_ddc_edid+0x50/0x70 > [ 0.356710] [ef871d70] [c02626e0] drm_ddc_read_edid+0x44/0xd8 > [ 0.356741] [ef871d90] [c026285c] drm_get_edid+0xe8/0x1a0 > [ 0.356770] [ef871db0] [c02a7b10] radeon_modeset_init+0x690/0x794 > [ 0.356802] [ef871e10] [c028a964] radeon_driver_load_kms+0x150/0x1b0 > [ 0.356841] [ef871e30] [c0257c8c] drm_get_dev+0x36c/0x45c > [ 0.356875] [ef871e60] [c0412180] radeon_pci_probe+0x1c/0x2c > [ 0.356912] [ef871e70] [c020c93c] local_pci_probe+0x24/0x34 > [ 0.356943] [ef871e80] [c020dc78] pci_device_probe+0x70/0xb0 > [ 0.356977] [ef871eb0] [c02f3e24] driver_probe_device+0x13c/0x2a8 > [ 0.357008] [ef871ed0] [c02f4008] __driver_attach+0x78/0xb4 > [ 0.357038] [ef871ef0] [c02f3218] bus_for_each_dev+0x68/0xc0 > [ 0.357067] [ef871f20] [c02f3ad4] driver_attach+0x24/0x34 > [ 0.357097] [ef871f30] [c02f2918] bus_add_driver+0x15c/0x324 > [ 0.357127] [ef871f50] [c02f442c] driver_register+0xcc/0x184 > [ 0.357158] [ef871f70] [c020df78] __pci_register_driver+0x74/0x108 > [ 0.357190] [ef871f90] [c0252024] drm_init+0x74/0x108 > [ 0.357224] [ef871fb0] [c05c3794] radeon_init+0xa4/0xb8 > [ 0.357254] [ef871fc0] [c0003eec] do_one_initcall+0x70/0x210 > [ 0.357289] [ef871fe0] [c05a21dc] kernel_init+0xbc/0x130 > [ 0.357318] [ef871ff0] [c0014120] kernel_thread+0x4c/0x68 > [ 0.651929] [drm] Determined LVDS native mode details from EDID > > > -- > Earthling Michel Dänzer | http://www.vmware.com > Libre software enthusiast | Debian, X and DRI developer > ------------------------------------------------------------------------------ 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 -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel