Bug 19012

Summary: Kernel Mode Setting Fails on Radeon X700
Product: Drivers Reporter: squeept
Component: Video(DRI - non Intel)Assignee: drivers_video-dri
Status: RESOLVED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: airlied, alexdeucher, bugz.kernel.tormod
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.35.5 x86_64 Subsystem:
Regression: No Bisected commit-id:
Attachments: Full 'lspci' Output
Linux 2.6.35.5 Custom Config
Linux 2.6.35 Generic Config
Dmesg from Custom Kernel
Dmesg from Generic Kernel
X.org Log
reidentify chip as a different family

Description squeept 2010-09-24 00:18:51 UTC
Created attachment 31162 [details]
Full 'lspci' Output

The kernel fails to set any video mode when booting, reverting automatically to a standard VGA console.  X.org does not succeed at initializing video with the radeon driver either, so this issue is not limited to the kernel DRI.


When testing with amd64 kernel at http://kernel.ubuntu.com/~kernel-ppa/mainline/v2.6.35.5-maverick/ :

============================================================================

> cat dmesg-generic.txt | grep -F "Linux version"

[    0.000000] Linux version 2.6.35-02063505-generic (root@zinc) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #201009211107 SMP Tue Sep 21 11:09:35 UTC 2010


> cat dmesg-generic.txt | grep -F "radeon"

[    4.492880] [drm] radeon defaulting to kernel modesetting.
[    4.492883] [drm] radeon kernel modesetting enabled.
[    4.493508] radeon 0000:02:00.0: PCI INT A -> Link[APC6] -> GSI 16 (level, low) -> IRQ 16
[    4.493512] radeon 0000:02:00.0: setting latency timer to 64
[    4.496389] radeon 0000:02:00.0: Expecting combios for RS400/RS480 GPU
[    4.496441] radeon 0000:02:00.0: Fatal error during GPU init
[    4.496490] [drm] radeon: finishing device.
[    4.496542] [drm] radeon: cp finalized
[    4.496707] radeon 0000:02:00.0: PCI INT A disabled
[    4.496746] radeon: probe of 0000:02:00.0 failed with error -22


> cat dmesg-generic.txt | grep -F "drm"

[    4.274104] [drm] Initialized drm 1.1.0 20060810
[    4.492880] [drm] radeon defaulting to kernel modesetting.
[    4.492883] [drm] radeon kernel modesetting enabled.
[    4.495945] [drm] initializing kernel modesetting (RV380 0x1002:0x5657).
[    4.496105] [drm] register mmio base: 0xFDDF0000
[    4.496106] [drm] register mmio size: 65536
[    4.496490] [drm] radeon: finishing device.
[    4.496542] [drm] radeon: cp finalized


> cat cfg-generic-2.6.35.txt | grep -F "RADEON"

CONFIG_DRM_RADEON=m
CONFIG_DRM_RADEON_KMS=y
CONFIG_FB_RADEON=m
CONFIG_FB_RADEON_I2C=y
CONFIG_FB_RADEON_BACKLIGHT=y
# CONFIG_FB_RADEON_DEBUG is not set


> cat cfg-generic-2.6.35.txt | grep -F "VESA"

CONFIG_FB_BOOT_VESA_SUPPORT=y
CONFIG_FB_UVESA=m
CONFIG_FB_VESA=y


> cat cfg-generic-2.6.35.txt | grep -F "VGA"

CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
CONFIG_VGA_SWITCHEROO=y
CONFIG_VGASTATE=m
CONFIG_FB_SVGALIB=m
CONFIG_FB_VGA16=m
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_USB_SISUSBVGA=m
# CONFIG_USB_SISUSBVGA_CON is not set



When testing with custom kernel built from kernel.org 2.6.35.5 stock sources :
==============================================================================

> cat dmesg-custom.txt | grep -F "Linux version"

Linux version 2.6.35.5-mana (root@glacial) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #1 SMP Wed Sep 22 23:52:31 EDT 2010


> cat dmesg-custom.txt | grep -F "radeon"

[drm] radeon defaulting to kernel modesetting.
[drm] radeon kernel modesetting enabled.
radeon 0000:02:00.0: PCI INT A -> Link[APC6] -> GSI 16 (level, low) -> IRQ 16
radeon 0000:02:00.0: setting latency timer to 64
radeon 0000:02:00.0: Expecting combios for RS400/RS480 GPU
radeon 0000:02:00.0: Fatal error during GPU init
[drm] radeon: finishing device.
[drm] radeon: cp finalized
radeon 0000:02:00.0: PCI INT A disabled
radeon: probe of 0000:02:00.0 failed with error -22


> cat dmesg-custom.txt | grep -F "drm"

[drm] Initialized drm 1.1.0 20060810
[drm] radeon defaulting to kernel modesetting.
[drm] radeon kernel modesetting enabled.
[drm] initializing kernel modesetting (RV380 0x1002:0x5657).
[drm] register mmio base: 0xFDDF0000
[drm] register mmio size: 65536
[drm] radeon: finishing device.
[drm] radeon: cp finalized



> cat cfg-custom-2.6.35.5.txt | grep -F "RADEON"

CONFIG_DRM_RADEON=y
CONFIG_DRM_RADEON_KMS=y
# CONFIG_FB_RADEON is not set


> cat cfg-custom-2.6.35.5.txt | grep -F "VESA"

# CONFIG_FB_BOOT_VESA_SUPPORT is not set
# CONFIG_FB_UVESA is not set
# CONFIG_FB_VESA is not set


> cat cfg-custom-2.6.35.5.txt | grep -F "VGA"

# CONFIG_VGA_ARB is not set
# CONFIG_VGA_SWITCHEROO is not set
# CONFIG_VGASTATE is not set
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_VGA16 is not set
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
# CONFIG_USB_SISUSBVGA is not set



Potentially Useful Messages from X.org :
========================================

X.Org X Server 1.7.6
Release Date: 2010-03-17
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-27-server x86_64 Ubuntu
Current Operating System: Linux glacial 2.6.35.5-mana #1 SMP Wed Sep 22 23:52:31 EDT 2010 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-2.6.35.5-mana root=/dev/sda2 ro quiet
Build Date: 21 July 2010  01:03:39PM

[...]

(--) PCI:*(0:2:0:0) 1002:5657:174b:0800 ATI Technologies Inc Radeon X550/X700 Series (RV410) rev 0, Mem @ 0xe8000000/134217728, 0xfddf0000/65536, I/O @ 0x0000bc00/256, BIOS @ 0x????????/131072
(--) PCI: (0:2:0:1) 1002:5677:174b:0801 ATI Technologies Inc rev 0, Mem @ 0xfdde0000/65536

[...]

(II) LoadModule: "dri"
	compiled for 1.7.6, module version = 1.0.0

(II) Loading extension XFree86-DRI
(II) LoadModule: "dri2"
	compiled for 1.7.6, module version = 1.1.0

(==) Matched ati as autoconfigured driver 0
(==) Matched vesa as autoconfigured driver 1
(==) Matched fbdev as autoconfigured driver 2

(II) LoadModule: "ati"
	compiled for 1.7.6, module version = 6.13.0

(II) LoadModule: "radeon"
	compiled for 1.7.6, module version = 6.13.0

[...]

(II) Primary Device is: PCI 02@00:00:0
(II) [KMS] drm report modesetting isn't supported.

[...]

(WW) Falling back to old probe method for vesa
(WW) Falling back to old probe method for fbdev

[...]

(EE) open /dev/fb0: No such file or directory
(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support

[...]

(II) RADEON(0): TOTO SAYS 00000000fddf0000
(II) RADEON(0): MMIO registers at 0x00000000fddf0000: size 64KB
(II) RADEON(0): PCI bus 2 card 0 func 0

[...]

(--) RADEON(0): Chipset: "ATI Radeon X550XTX 5657 (PCIE)" (ChipID = 0x5657)
(--) RADEON(0): Linear framebuffer at 0x00000000e8000000

[...]

(II) RADEON(0): initializing int10
(II) RADEON(0): Primary V_BIOS segment is: 0xc000
(II) RADEON(0): ATOM BIOS detected
(II) RADEON(0): ATOM BIOS Rom: 
	SubsystemVendorID: 0x174b SubsystemID: 0x0800
	IOBaseAddress: 0xbc00
	Filename: 9C8020SA.002
	BIOS Bootup Message: 

RV410 M26

[...]

(II) RADEON(0): Framebuffer space used by Firmware (kb): 20
(II) RADEON(0): Start of VRAM area used by Firmware: 0x7ffb000
(II) RADEON(0): AtomBIOS requests 20kB of VRAM scratch space
(II) RADEON(0): AtomBIOS VRAM scratch base: 0x7ffb000
(II) RADEON(0): Cannot get VRAM scratch space. Allocating in main memory instead

[...]

(EE) RADEON(0): [dri] RADEONDRIGetVersion failed to open the DRM
[dri] Disabling DRI.

[...]

(==) RADEON(0): Assuming overlay scaler buffer width is 1536
(II) RADEON(0): MM_TABLE: 74-18-bb-04-00-3a-40-10-74-0a-83-c3-1b-3b
(II) RADEON(0): This card has MM_TABLE we do not recognize.
(!!) RADEON(0): MergedFB support has been removed and replaced with xrandr 1.2 support

[...]

(II) RADEON(0): RADEONInitMemoryMap() : 
(II) RADEON(0):   mem_size         : 0x10000000
(II) RADEON(0):   MC_FB_LOCATION   : 0xefffe000
(II) RADEON(0):   MC_AGP_LOCATION  : 0xffffffc0

(II) RADEON(0): RADEONRestoreMemMapRegisters() : 
(II) RADEON(0):   MC_FB_LOCATION   : 0xefffe000 0xf7ffe800
(II) RADEON(0):   MC_AGP_LOCATION  : 0xffffffc0

(WW) RADEON(0): Direct rendering disabled

[...]

Fatal server error:
Couldn't find valid PLL dividers
Comment 1 squeept 2010-09-24 00:19:41 UTC
Created attachment 31172 [details]
Linux 2.6.35.5 Custom Config
Comment 2 squeept 2010-09-24 00:20:06 UTC
Created attachment 31182 [details]
Linux 2.6.35 Generic Config
Comment 3 squeept 2010-09-24 00:20:38 UTC
Created attachment 31192 [details]
Dmesg from Custom Kernel
Comment 4 squeept 2010-09-24 00:21:18 UTC
Created attachment 31202 [details]
Dmesg from Generic Kernel
Comment 5 squeept 2010-09-24 00:22:04 UTC
Created attachment 31212 [details]
X.org Log
Comment 6 Dave Airlie 2010-09-24 03:20:44 UTC
Created attachment 31222 [details]
reidentify chip as a different family
Comment 7 Dave Airlie 2010-09-24 03:21:22 UTC
can you verify you haven't flashed the BIOS yourself thinking it would provide amazing speedups?

because the bios and gpu seriously don't seem to match.
Comment 8 squeept 2010-09-24 19:02:31 UTC
Still using the stock video BIOS.  It's ironic, because I originally selected this particular card for price and compatibility rather than performance.

As far as I'm aware, this was one of the last cards to be issued in this X550/X700 series.  I thought it was marketed as an X800, though my memory may fail me.

It does work correctly in Windows 7 out of the box, so presumably there's nothing actually wrong with the video BIOS.

The file you posted appears to be a patch against 'include/drm/drm_pciids.h'.  I shall try applying it later, rebuilding the kernel, and return to report the results.
Comment 9 Alex Deucher 2010-09-24 19:25:55 UTC
According to the internal pci id database, 0x5657 is indeed an rv410.  I suspect it must have been added wrong initially and no one ever ran into it or reported problems with it until now.
Comment 10 squeept 2010-09-24 22:40:18 UTC
Huzzah!  Patched kernel works great.  Switching between VT and X is now extremely fast :)

Even better, X now loads and runs with the 'ati' driver.  3D also seems to be working, although it's a bit unstable (some games lockup the system after a few minutes).

Thanks for the fast and effective response!
Comment 11 Tormod Volden 2010-09-25 13:22:16 UTC
The lockups can be the polling bug in https://bugs.freedesktop.org/show_bug.cgi?id=29389 which I see on my 0x5653 (both r300 and r300g).
Comment 12 Alex Deucher 2010-09-25 18:14:10 UTC
FWIW, the ddx has the pci id correctly associated with rv410, so it
looks like it was just improperly ported to the drm.