From: Alex Deucher Subject: Re: drm-radeon-testing commit 8131660130d3dc2629a150d47e6a04c8a1a6244b breaks LVDS on my PowerBook Date: Wed, 27 Jan 2010 12:07:41 -0500 Message-ID: References: <1264604067.3793.865.camel@thor.local> <1264607083.3793.1039.camel@thor.local> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1264607083.3793.1039.camel@thor.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.sourceforge.net To: =?ISO-8859-1?Q?Michel_D=E4nzer?= Cc: dri-devel@lists.sf.net List-Id: dri-devel@lists.freedesktop.org 2010/1/27 Michel D=E4nzer : > On Wed, 2010-01-27 at 10:30 -0500, Alex Deucher wrote: >> 2010/1/27 Michel D=E4nzer : >> > >> > 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. =A0Switching >> back to sw i2c should fix it in the meantime. =A0Set 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] > Out of curiosity, does hw i2c work on the DVI port? That would rule out the prescale. Alex >> For the prescale: >> u32 prescale =3D (((rdev->clock.default_sclk * 10)/(4 * 128 * 100) + 1) >> << 8) + 128; >> does rdev->clock.default_sclk get initialized properly on the mac? =A0If >> 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 > > > [0] Though actually I notice there's a warning in dmesg with that as > well: > > [ =A0 =A00.355965] [drm] =A0 =A0 TV1: INTERNAL_DAC2 > [ =A0 =A00.356037] > [ =A0 =A00.356040] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D > [ =A0 =A00.356072] [ INFO: possible recursive locking detected ] > [ =A0 =A00.356096] 2.6.32.6 #434 > [ =A0 =A00.356112] --------------------------------------------- > [ =A0 =A00.356136] swapper/1 is trying to acquire lock: > [ =A0 =A00.356158] =A0(&adap->bus_lock){+.+...}, at: [] i2c_tra= nsfer+0x84/0x178 > [ =A0 =A00.356219] > [ =A0 =A00.356221] but task is already holding lock: > [ =A0 =A00.356249] =A0(&adap->bus_lock){+.+...}, at: [] i2c_tra= nsfer+0x84/0x178 > [ =A0 =A00.356294] > [ =A0 =A00.356296] other info that might help us debug this: > [ =A0 =A00.356328] 1 lock held by swapper/1: > [ =A0 =A00.356346] =A0#0: =A0(&adap->bus_lock){+.+...}, at: [] = i2c_transfer+0x84/0x178 > [ =A0 =A00.356396] > [ =A0 =A00.356397] stack backtrace: > [ =A0 =A00.356422] Call Trace: > [ =A0 =A00.356447] [ef871b50] [c00094fc] show_stack+0x7c/0x194 (unreliabl= e) > [ =A0 =A00.356485] [ef871b90] [c007ebe4] __lock_acquire+0x15c0/0x16a8 > [ =A0 =A00.356515] [ef871c20] [c007edb8] lock_acquire+0xec/0x128 > [ =A0 =A00.356549] [ef871c60] [c040bfa4] mutex_lock_nested+0x5c/0x2c8 > [ =A0 =A00.356580] [ef871cc0] [c0355910] i2c_transfer+0x84/0x178 > [ =A0 =A00.356612] [ef871cf0] [c02aa56c] radeon_i2c_xfer+0x44/0x80 > [ =A0 =A00.356643] [ef871d10] [c0355938] i2c_transfer+0xac/0x178 > [ =A0 =A00.356679] [ef871d40] [c026267c] drm_do_probe_ddc_edid+0x50/0x70 > [ =A0 =A00.356710] [ef871d70] [c02626e0] drm_ddc_read_edid+0x44/0xd8 > [ =A0 =A00.356741] [ef871d90] [c026285c] drm_get_edid+0xe8/0x1a0 > [ =A0 =A00.356770] [ef871db0] [c02a7b10] radeon_modeset_init+0x690/0x794 > [ =A0 =A00.356802] [ef871e10] [c028a964] radeon_driver_load_kms+0x150/0x1= b0 > [ =A0 =A00.356841] [ef871e30] [c0257c8c] drm_get_dev+0x36c/0x45c > [ =A0 =A00.356875] [ef871e60] [c0412180] radeon_pci_probe+0x1c/0x2c > [ =A0 =A00.356912] [ef871e70] [c020c93c] local_pci_probe+0x24/0x34 > [ =A0 =A00.356943] [ef871e80] [c020dc78] pci_device_probe+0x70/0xb0 > [ =A0 =A00.356977] [ef871eb0] [c02f3e24] driver_probe_device+0x13c/0x2a8 > [ =A0 =A00.357008] [ef871ed0] [c02f4008] __driver_attach+0x78/0xb4 > [ =A0 =A00.357038] [ef871ef0] [c02f3218] bus_for_each_dev+0x68/0xc0 > [ =A0 =A00.357067] [ef871f20] [c02f3ad4] driver_attach+0x24/0x34 > [ =A0 =A00.357097] [ef871f30] [c02f2918] bus_add_driver+0x15c/0x324 > [ =A0 =A00.357127] [ef871f50] [c02f442c] driver_register+0xcc/0x184 > [ =A0 =A00.357158] [ef871f70] [c020df78] __pci_register_driver+0x74/0x108 > [ =A0 =A00.357190] [ef871f90] [c0252024] drm_init+0x74/0x108 > [ =A0 =A00.357224] [ef871fb0] [c05c3794] radeon_init+0xa4/0xb8 > [ =A0 =A00.357254] [ef871fc0] [c0003eec] do_one_initcall+0x70/0x210 > [ =A0 =A00.357289] [ef871fe0] [c05a21dc] kernel_init+0xbc/0x130 > [ =A0 =A00.357318] [ef871ff0] [c0014120] kernel_thread+0x4c/0x68 > [ =A0 =A00.651929] [drm] Determined LVDS native mode details from EDID > > > -- > Earthling Michel D=E4nzer =A0 =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0http://www.vmware.com > Libre software enthusiast =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0Debian, 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 busine= ss 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 --