Bug 15112

Summary: Radeon KMS on RV250 gets wrong refresh rate.
Product: Drivers Reporter: Joe Kowalski (joekowalski)
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: RESOLVED OBSOLETE    
Severity: normal CC: alexdeucher, joekowalski
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.33 Subsystem:
Regression: No Bisected commit-id:
Attachments: Dmesg under Ums
Dmesg under kms
Xorg.0.log under ums
Xorg.0.log under kms
RV250 bios

Description Joe Kowalski 2010-01-23 07:57:32 UTC
When booting with KMS disabled, the ati UMS xorg driver properly sets the display mode to 1400x1050@60.2hz. xrandr reports the following modes:
$ DISPLAY=:0 xrandr
Screen 0: minimum 320 x 200, current 1400 x 1050, maximum 1400 x 1400
VGA-0 disconnected (normal left inverted right x axis y axis)        
LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1400x1050      60.2*+                                                         
   1280x1024      59.9     60.0                                                  
   1280x960       60.0     59.9                                                  
   1280x854       59.9                                                           
   1280x800       59.8                                                           
   1280x720       59.9                                                           
   1152x768       59.8                                                           
   1024x768       60.0     59.9                                                  
   800x600        60.3     59.9                                                  
   640x480        59.9     59.4                                                  
S-video disconnected (normal left inverted right x axis y axis)

However when booting with KMS enabled, all that appears is a black screen. After verifying that fbcon is built into the kernel and that KMS is initializing, I also found that the xserver had started up, but still with a blank screen. After blindly logging in, I ssh'd into the box, and found the following xrandr modes: 
$ DISPLAY=:0 xrandr
Screen 0: minimum 320 x 200, current 1400 x 1050, maximum 4096 x 4096
VGA-0 disconnected (normal left inverted right x axis y axis)
LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1400x1050      60.5 +   60.0*
   1280x1024      59.9     60.0
   1280x960       60.0     59.9
   1280x854       59.9
   1280x800       59.8
   1280x720       59.9
   1152x768       59.8
   1024x768       60.0     59.9
   800x600        60.3     59.9
   848x480        59.7
   720x480        59.7
   640x480        59.9     59.4
S-video disconnected (normal left inverted right x axis y axis)

It appears when using KMS, the correct refresh rate for the 1400x1050 resolution  isn't found and instead is a rate that doesn't work with this panel gets setup, resulting in a blank screen.
Comment 1 Joe Kowalski 2010-01-23 07:58:51 UTC
Created attachment 24680 [details]
Dmesg under Ums
Comment 2 Joe Kowalski 2010-01-23 08:06:29 UTC
Created attachment 24681 [details]
Dmesg under kms
Comment 3 Joe Kowalski 2010-01-23 08:07:37 UTC
Oops first attachment is under ums.
Comment 4 Joe Kowalski 2010-01-23 08:08:49 UTC
Created attachment 24682 [details]
Xorg.0.log under ums
Comment 5 Joe Kowalski 2010-01-23 08:09:22 UTC
Created attachment 24683 [details]
Xorg.0.log under kms
Comment 6 Joe Kowalski 2010-01-23 08:13:14 UTC
Forgot to add: Switching modes under kms with xrandr to a resolution below 1400x1050 results in a working display, although at a poorer resolution. Switching back to the 1400x1050 mode results in a black screen again.
Comment 7 Alex Deucher 2010-01-23 15:58:12 UTC
Under KMS you have two 1400x1050 modes:
LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 0mm x
0mm
   1400x1050      60.5 +   60.0*

For some reason, 1400x1050@60 is being selected (marked with the *) while 1400x1050@60.5 is the panel's preferred mode (marked with the +).  Does selecting 1400x1050@60.5 with xrandr work?  e.g.,
xrandr --output LVDS --mode 1400x1050 --rate 60.5
Comment 8 Joe Kowalski 2010-01-23 22:06:18 UTC
Okay, after boot it does default to the 60.5 rate, but only displaying the black screen:
$DISPLAY=:0 xrandr                                   
Screen 0: minimum 320 x 200, current 1400 x 1050, maximum 4096 x 4096         
VGA-0 disconnected (normal left inverted right x axis y axis)                 
LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1400x1050      60.5*+   60.0                                                  
   1280x1024      59.9     60.0                                                  
   1280x960       60.0     59.9                                                  
   1280x854       59.9                                                           
   1280x800       59.8                                                           
   1280x720       59.9                                                           
   1152x768       59.8                                                           
   1024x768       60.0     59.9                                                  
   800x600        60.3     59.9                                                  
   848x480        59.7                                                           
   720x480        59.7                                                           
   640x480        59.9     59.4                                                  
S-video disconnected (normal left inverted right x axis y axis)         

After switching to a different resolution or to the 60.0 rate (still a black screen), I can't switch back to the 60.5 rate:
$ DISPLAY=:0 xrandr -s 1400x1050 --rate 60.5     
$ DISPLAY=:0 xrandr 
Screen 0: minimum 320 x 200, current 1400 x 1050, maximum 4096 x 4096
VGA-0 disconnected (normal left inverted right x axis y axis)        
LVDS connected 1400x1050+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1400x1050      60.5 +   60.0*                                                 
   1280x1024      59.9     60.0                                                  
   1280x960       60.0     59.9                                                  
   1280x854       59.9                                                           
   1280x800       59.8                                                           
   1280x720       59.9                                                           
   1152x768       59.8                                                           
   1024x768       60.0     59.9                                                  
   800x600        60.3     59.9                                                  
   848x480        59.7                                                           
   720x480        59.7                                                           
   640x480        59.9     59.4                                                  
S-video disconnected (normal left inverted right x axis y axis)
Comment 9 Alex Deucher 2010-01-25 03:36:00 UTC
Can you attach a copy of your video bios?
as root:
cd /sys/bus/pci/devices/<pci bus id>
echo 1 > rom
cat rom > /tmp/rv250.rom
echo 0 > rom
Comment 10 Joe Kowalski 2010-01-25 05:50:07 UTC
Created attachment 24699 [details]
RV250 bios

Here you go.
Comment 11 Joe Kowalski 2010-02-27 16:14:55 UTC
This problem is still present in 2.6.33 final.
Comment 12 Joe Kowalski 2010-04-08 01:05:53 UTC
Still present with 2.6.34-rc+ at about 0fdf86754f70e813845af4abaa805165ce57a0bb.
Comment 13 Joe Kowalski 2011-03-29 16:00:40 UTC
Finally got around to upgrading that machine to 2.6.38, and KMS now sets a proper mode.