Bug 152204

Summary: Incorrect PLL parameters detection for Radeon driver prevents DRI from working correctly on powerpc
Product: [Fedora] Fedora Reporter: Eugene Savelov <savelov>
Component: xorg-x11Assignee: Mike A. Harris <mharris>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: byte
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-23 06:38:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 121179    
Attachments:
Description Flags
x server log without dri option
none
x server log with dri option
none
Xorg log file, when it is run for the fist time - PLL parameters not detected
none
Xorg log file, when it is run for the second time - PLL parameters detected
none
118438: Xorg log file, when it is run for the fist time - PLL parameters not detected
none
Xorg log file, when it is run for the second time - PLL parameters detected
none
function RADEONProbePLLParameters from xorg CVS (powerpc only) none

Description Eugene Savelov 2005-03-26 06:41:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.6) Gecko/20050308 Firefox/1.0.1 Fedora/1.0.1-5

Description of problem:
When running system-config-display after installation of Fedora Core4 test on Mac Mini 1.4Ghz, monitor goes to powersave mode. When run as "system-config-display --reconfig --noui", it configured xorg.conf , with driver "Radeon", which still doesn't work.  Config which worked for me - (not sure if it is optimal) - 
Section "Device"
   Identifier  "Videocard0"
   Driver      "ati"
   BoardName   "ATI Radeon 9200"
   Option  "UseFBDev"      "True"
   Option  "AGPMode"       "4"
   Option  "AGPFastWrite"   "off"
EndSection



Version-Release number of selected component (if applicable):
system-config-display-1.0.25-1

How reproducible:
Always

Steps to Reproduce:
1. Install fc4test1
2. run system-config-display
3. 
  

Actual Results:  Monitor going into powersave mode, incorrect config written to /etc/X11/xorg.conf

Expected Results:  Configure videocard/monitor properly

Additional info:

[eugene@mac log]$ /sbin/lspci
00:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 AGP
00:10.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200] (rev 01)
0001:10:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 PCI
0001:10:17.0 Class ff00: Apple Computer Inc. KeyLargo/Intrepid Mac I/O
0001:10:18.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB
0001:10:19.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB
0001:10:1a.0 USB Controller: Apple Computer Inc. KeyLargo/Intrepid USB
0001:10:1b.0 USB Controller: NEC Corporation USB (rev 43)
0001:10:1b.1 USB Controller: NEC Corporation USB (rev 43)
0001:10:1b.2 USB Controller: NEC Corporation USB 2.0 (rev 04)
0002:20:0b.0 Host bridge: Apple Computer Inc. UniNorth 2 Internal PCI
0002:20:0d.0 Class ff00: Apple Computer Inc. UniNorth/Intrepid ATA/100
0002:20:0e.0 FireWire (IEEE 1394): Apple Computer Inc. UniNorth 2 FireWire (rev 81)
0002:20:0f.0 Ethernet controller: Apple Computer Inc. UniNorth 2 GMAC (Sun GEM) (rev 80)
[eugene@mac log]$

Comment 1 Colin Charles 2005-05-16 12:45:49 UTC
Can this still be repeated with FC4t3? I can't (though I'm not doing it via dvi
as I lack said hardware). s-c-display gives:

Section "Device"
        Identifier  "Videocard0"
        Driver      "radeon"
        VendorName  "Videocard vendor"
        BoardName   "ATI Radeon 9200"
        Option      "UseFBDev" "true"
EndSection

in FC4t3. Can you please retest?

Comment 2 Eugene Savelov 2005-05-16 16:35:50 UTC
I tested with fc4test3 - 
now I get somewhat unsynchronized  screen output (at the last stage - gdm login)
because of (probably) conflict between DRI kernel driver and FBDEV. 
I had to remove  'Load  "dri" ' from the section "Module" to get correct screen
output.  I heard that DRI works correctly using Option "UseFBDev" "false",
but that (as I tested previously) doesn't detect my  display at all. Thank you




Comment 3 Eugene Savelov 2005-05-16 16:38:38 UTC
Created attachment 114427 [details]
x server log without dri option

Section "Module
#Load  "dri"

Comment 4 Eugene Savelov 2005-05-16 16:39:59 UTC
Created attachment 114428 [details]
x server log with dri option

Section "Module"
Load "dri"

Comment 5 sami 2005-06-02 12:57:07 UTC
Hi I have the exact same problem - I am a newbie to linux, so I don't really know how to get acces to a 
terminal/shell before fedora login. Could you please tell me what keys to press befor login, to get acces 
to a prompt/shell ?



(In reply to comment #2)
> I tested with fc4test3 - 
> now I get somewhat unsynchronized  screen output (at the last stage - gdm login)
> because of (probably) conflict between DRI kernel driver and FBDEV. 
> I had to remove  'Load  "dri" ' from the section "Module" to get correct screen
> output.  I heard that DRI works correctly using Option "UseFBDev" "false",
> but that (as I tested previously) doesn't detect my  display at all. Thank you
> 
> 
> 

Comment 6 Eugene Savelov 2005-09-04 15:46:24 UTC
This bug affects both VGA and DVI displays,

When Gnome display manager starts, graphics picture is displayed incorrectly due
to no PLL parameters detected bu X server. But when I press Ctrl-Alt-Backspace,
and re-initialize X server, it detects PLL parameters correctly and everything
is fine (RADEON(0): PLL parameters: rf=2700 rd=12 min=12500 max=35000; xclk=10300).
Alsom when I comment out DRI module from xorg.conf, everything is fine

Sometimes,  X server re-inititalizes itself automatically, and it seems like
everything is good,  but when you look into /var/log/ - there must be two log
files Xorg.0.log and Xorg.0.log.old , dated nearly for the same time -  as it
did not detect PLL parameters for the first time 


Comment 7 Eugene Savelov 2005-09-04 15:48:34 UTC
Created attachment 118438 [details]
Xorg log file, when it is run for the fist time - PLL parameters not detected

Comment 8 Eugene Savelov 2005-09-04 15:49:35 UTC
Created attachment 118439 [details]
Xorg log file, when it is run for the second time - PLL parameters detected

Comment 9 Eugene Savelov 2005-09-04 15:56:13 UTC
Created attachment 118440 [details]
118438: Xorg log file, when it is run for the fist time - PLL parameters not detected

Comment 10 Eugene Savelov 2005-09-04 15:57:20 UTC
Created attachment 118441 [details]
Xorg log file, when it is run for the second time - PLL parameters detected

Comment 11 Eugene Savelov 2005-09-05 17:54:04 UTC
seems like this config file works best for Mac mini

Section "Module"
        Load  "dbe"
        Load  "extmod"
        Load  "fbdevhw"
        Load  "glx"
        Load  "record"
        Load  "freetype"
        Load  "type1"
        Load  "dri"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "L1730S"
        DisplaySize  340        270
        HorizSync    30.0 - 83.0
        VertRefresh  56.0 - 75.0
        Option      "dpms"
EndSection

Section "Device"
        Identifier  "Videocard0"
        Driver      "radeon"
        VendorName  "Videocard vendor"
        BoardName   "ATI Radeon 9200"
        Option      "AGPMode"  "2"
        BusID       "PCI:0:16:0"
EndSection


Comment 12 Eugene Savelov 2005-09-06 15:48:44 UTC
Section "Device"
        Identifier  "Videocard0"
        Driver      "radeon"
        VendorName  "Videocard vendor"
        BoardName   "ATI Radeon 9200"
        Option      "AGPMode"  "2"
        BusID       "PCI:0:16:0"
        Option      "UseFBDev" "true"
EndSection


Comment 13 Eugene Savelov 2005-09-06 16:49:13 UTC
I finally found a  fix/workaround to this problem:

load drm module  radeon  in /etc/rc.d/rc.local

[eugene@localhost ~]$ cat /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
/sbin/modprobe radeon


Comment 14 Eugene Savelov 2005-09-10 15:15:28 UTC
Actually, xorg radeon driver detects PLL only in 20% of times, and this
workaround doesn't  help much


Comment 15 Eugene Savelov 2005-09-18 07:27:55 UTC
Created attachment 118943 [details]
function RADEONProbePLLParameters from xorg CVS (powerpc only)

This patch fixed the problem with incorrect PLL parameters detection on my
Radeon

Comment 16 Eugene Savelov 2005-09-18 08:04:09 UTC
Can we include this fix in update RPMS of xorg-x11?  As I understand, many Mac
users  installing fedora core4/powerpc  experience such problems (e.g.
http://forums.fedoraforum.org/showthread.php?t=73647).  Also, this patch doesn't
touch other architectures except powerpc, so it should not harm other platforms

Thank you



Comment 17 Eugene Savelov 2005-09-18 16:02:04 UTC
Original patch by Benjamin Herrenschmidt
http://lists.freedesktop.org/pipermail/xorg/2004-December/004953.html

Comment 18 Mike A. Harris 2005-09-23 04:55:24 UTC
Please report this issue to X.Org developers by filing a bug report in
the X.Org bugzilla located at http://bugs.freedesktop.org in the "xorg"
component.  Be sure to indicate in your X.Org bug report that the bug
is for the 6.8.x branch, attach the patch to the bug as a file attachment,
and request that it be nominated for inclusion in future 6.8.x releases.

Once you've filed your bug report to X.Org, if you paste the new
bug URL here, Red Hat will continue to track the issue in the
centralized X.Org bug tracker.  Once X.Org has accepted the patch
into the 6.8.x branch of CVS, we may consider including it in a future
Fedora Core update.

Setting status to "NEEDINFO_REPORTER", awaiting X.Org bug URL
for tracking.

Comment 19 Mike A. Harris 2005-09-23 06:38:10 UTC
Thanks for the bug URL.  Tracking upstream at: 

http://freedesktop.org/bugzilla/show_bug.cgi?id=4371



Comment 20 David Woodhouse 2005-09-23 07:07:33 UTC
Please test whether this is fixed in the FC4 test rpms uploaded a few months ago
to ftp://zeniv.uk.linux.org/pub/people/dwmw2/x-radeon/

You should be able to use just the 'radeon_drv.o' from the xorg-x11 package
there, if you don't want to downgrade all your xorg-x11 packages. I'll build an
updated set.

Comment 21 Eugene Savelov 2005-09-23 16:59:53 UTC
Yes, I downloaded
ftp://zeniv.uk.linux.org/pub/people/dwmw2/x-radeon/radeon-drv-6.8.2-37.FC4.49.3.radeon.1.ppc.o
and it worked correctly as a replacement for radeon_drv.o