Bug 60710

Summary: Radeon RV530 I2C failure with DVI monitor.
Product: Drivers Reporter: Chris Rankin (rankincj)
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: NEW ---    
Severity: normal CC: alexdeucher, szg00000
Priority: P1    
Hardware: i386   
OS: Linux   
Kernel Version: 3.10.5 Subsystem:
Regression: No Bisected commit-id:
Attachments: dmesg log for 3.10.5 (WORKING)
Relevant slice of /var/log/messages

Description Chris Rankin 2013-08-06 22:10:05 UTC
Experimenting with my T60p laptop with built-in M66GL chip (~RV530?); 1680x1050 LVDS panel + 1920x1200 LCD monitor. Also attached to a docking station with HD4650 card, and 1920x1080 HDTV connected to that.

This combination seems to start up fine. However, when I was trying to switch my primary display to be the HDTV, the latop "beeped" at me and then shut down all displays. Studying my logs later revealed the following:

Aug  6 15:21:39 lantern kernel: [TTM] Illegal buffer object size
Aug  6 15:21:39 lantern kernel: [TTM] Illegal buffer object size
Aug  6 15:21:39 lantern kernel: [drm:radeon_gem_object_create] *ERROR* Failed to allocate GEM object (0, 6, 4096, -22)
Aug  6 15:21:39 lantern kernel: [drm:r500_hw_i2c_xfer] *ERROR* failed to get i2c bus
Aug  6 15:21:39 lantern kernel: [drm:r500_hw_i2c_xfer] *ERROR* failed to get i2c bus
Aug  6 15:21:39 lantern kernel: [drm:r500_hw_i2c_xfer] *ERROR* failed to get i2c bus
Aug  6 15:21:39 lantern kernel: [drm:r500_hw_i2c_xfer] *ERROR* failed to get i2c bus
Aug  6 15:21:39 lantern kernel: [drm:r500_hw_i2c_xfer] *ERROR* failed to get i2c bus

After this point, only the LVDS panel would work. Worse, I had to boot with "radeon.hw_i2c=0" before I was able to turn the 1920x1200 monitor back on with:

$ xrandr --output DVI-0 --auto

Now that everything is (finally!) working again as it used to, XRandR is reporting this:

$ xrandr -q
Screen 0: minimum 320 x 200, current 1920 x 1200, maximum 8192 x 8192
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS connected (normal left inverted right x axis y axis)
   1680x1050      60.1 +   50.1  
   1400x1050      60.0  
   1280x1024      59.9  
   1440x900       59.9  
   1280x960       59.9  
   1280x854       59.9  
   1280x800       59.8  
   1280x720       59.9  
   1152x768       59.8  
   1024x768       59.9  
   800x600        59.9  
   848x480        59.7  
   720x480        59.7  
   640x480        59.4  
DVI-0 connected primary 1920x1200+0+0 (normal left inverted right x axis y axis) 546mm x 352mm
   1680x1050      59.9 +
   1920x1200      60.0*+
   1600x1200      60.0  
   1600x1000      60.0  
   1280x1024      75.0  
   1280x960       60.0  
   1152x864       75.0  
   1024x768       75.1     60.0  
   832x624        74.6  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1  
DVI-1-1 connected (normal left inverted right x axis y axis)
   1920x1080      50.0 +   60.0  
DIN-1-0 disconnected (normal left inverted right x axis y axis)
DVI-1-2 disconnected (normal left inverted right x axis y axis)

I don't know what happened - all I know is that HW I2C broke suddenly and had to be disabled completely before I could restore everything. However, I have since turned HW I2C back on - and it's fine again!

Did I push something over the edge of a cliff?
Comment 1 Chris Rankin 2013-08-06 22:11:20 UTC
Created attachment 107126 [details]
dmesg log for 3.10.5 (WORKING)

This doesn't demonstrate the problem. It's merely to describe the T60p hardware better.
Comment 2 Chris Rankin 2013-08-06 22:26:20 UTC
Created attachment 107128 [details]
Relevant slice of /var/log/messages

I've trawled through my remaining logs, and after the initial error they really don't get any better than:

Aug  6 15:46:43 lantern kernel: [drm:r500_hw_i2c_xfer] *ERROR* failed to get i2c bus

I was originally trying to get my HD4650 card to drive my HDTV, while leaving my 1920x1200 monitor and LVDS panel driven by the internal M66GL chip. However, I'm not sure that I succeeded. More likely, I accidentally pushed XRandR into a configuration that the HW I2C was unable to handle gracefully instead.
Comment 3 Alex Deucher 2013-08-06 22:45:40 UTC
hw i2c is diabled by default for a reason.  The error message means the driver was not able to aquire the hw lock for the i2c engine.  As to why, I'm not sure. The hw i2c engine somehow got into a bad state.
Comment 4 Chris Rankin 2013-08-07 08:41:12 UTC
(In reply to Alex Deucher from comment #3)
> The hw i2c engine somehow got into a bad state.

Not only that, but GNOME3 put the HW I2C engine back into that same "bad state" when I rebooted and logged back in. (The DVI-0 monitor was switched to a non-native 1680x1050 mode during the whole reboot process, but was then shut down and disconnected when GNOME3 was unable to reconfigure it for its native 1920x1200 mode).

> hw i2c is diabled by default for a reason.

Yes, presumably because it has bugs like this in ;-). But surely that doesn't mean you're not interested in people reporting those bugs when they find them?
Comment 5 Alex Deucher 2013-08-07 13:21:02 UTC
(In reply to Chris Rankin from comment #4)
> (In reply to Alex Deucher from comment #3)
> > The hw i2c engine somehow got into a bad state.
> 
> Not only that, but GNOME3 put the HW I2C engine back into that same "bad
> state" when I rebooted and logged back in. (The DVI-0 monitor was switched
> to a non-native 1680x1050 mode during the whole reboot process, but was then
> shut down and disconnected when GNOME3 was unable to reconfigure it for its
> native 1920x1200 mode).

Well a warm reboot may not have fuly reset the hardware; the bad state may have persisted.

> 
> > hw i2c is diabled by default for a reason.
> 
> Yes, presumably because it has bugs like this in ;-). But surely that
> doesn't mean you're not interested in people reporting those bugs when they
> find them?

Sure, I just wouldn't hold out much hope for a fix :)  r5xx hardware is pretty old.
Comment 6 Chris Rankin 2013-08-07 15:39:28 UTC
(In reply to Alex Deucher from comment #5)
> Well a warm reboot may not have fuly reset the hardware; the bad state may
> have persisted.

What "warm reboot"? IIRC, I powered the laptop down and came back to it ~6 hours later (although admittedly, I didn't remote the battery). The DVI-0 monitor came back fine afterwards, until I actually logged in and (presumably) GNOME3 tried to apply my account's XRandR settings.