Bug 37442 - Radeon 9600 Mobile (RV350) freezes on glxgears - bisected
Summary: Radeon 9600 Mobile (RV350) freezes on glxgears - bisected
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - non Intel) (show other bugs)
Hardware: All Linux
: P1 high
Assignee: drivers_video-dri
URL:
Keywords:
Depends on:
Blocks: 32012
  Show dependency tree
 
Reported: 2011-06-13 17:18 UTC by Wolfram Sang
Modified: 2011-06-18 08:24 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.39
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
kernelconfig (76.80 KB, text/plain)
2011-06-13 17:18 UTC, Wolfram Sang
Details
Proposed fix (1.23 KB, patch)
2011-06-15 09:33 UTC, Wolfram Sang
Details | Diff

Description Wolfram Sang 2011-06-13 17:18:49 UTC
Created attachment 61872 [details]
kernelconfig

Since 2.6.39 and also with 3.0-rc2, when starting glxgears, my machine freezes (as in "even caps/lock does not respond anymore"). Despite that, X-Server and 2D-stuff (shells, browsers) work fine all the time. Bisecting resulted in:

8410ea3b95d105a5be5db501656f44bbb91197c1 is the first bad commit
commit 8410ea3b95d105a5be5db501656f44bbb91197c1
Author: Dave Airlie <airlied@gmail.com>
Date:   Wed Dec 15 03:16:38 2010 +1000

    drm: rework PCI/platform driver interface.
    
    This abstracts the pci/platform interface out a step further,
    we can go further but this is far enough for now to allow USB
    to be plugged in.
    
    The drivers now just call the init code directly for their
    device type.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>

I can confirm that 2.6.38-rc5 worked fine and 2.6.39 with this commit reverted (and manually disabled drm_usb) works fine, too. Seems really to be the culprit.

Note: I don't have DRM_RADEON_KMS enabled, if I do, there is no crash (but the framerate drops from 260fps to 13 fps).

lspci:

01:00.0 VGA compatible controller: ATI Technologies Inc RV350 [Mobility Radeon 9600 M10] (prog-if 00 [VGA controller])
	Subsystem: Fujitsu Technology Solutions Device 106b
	Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 11
	Memory at d0000000 (32-bit, prefetchable) [size=128M]
	I/O ports at b000 [size=256]
	Memory at ffcf0000 (32-bit, non-prefetchable) [size=64K]
	Expansion ROM at ffcc0000 [disabled] [size=128K]
	Capabilities: [58] AGP version 2.0
	Capabilities: [50] Power Management version 2
	Kernel driver in use: radeonfb

xorg.conf (changing options here did not have an effect):

Section "Device"
        Identifier      "Generic Video Card"
        Driver          "radeon"
        Option          "DynamicPM"             "on"
# Driver warns about FastWrite!
#       Option          "AGPFastWrite"          "on"
# Don't try EXA! Very slow on this card!
        Option          "AccelMethod"           "XAA"
# 4 does not work and freezes the machine :(
        Option          "AGPMode"               "2"
        Option          "EnablePageFlip"        "on"
EndSection
Comment 1 Wolfram Sang 2011-06-13 17:21:05 UTC
Despite the custom kernel, this is a pretty standard Debian Squeeze machine.
Comment 2 Rafael J. Wysocki 2011-06-13 21:05:28 UTC
First-Bad-Commit : 8410ea3b95d105a5be5db501656f44bbb91197c1
Comment 3 Dave Airlie 2011-06-13 23:40:48 UTC
for the KMS case not working I suspect the radeon module isn't getting loaded early enough by the distro so ends up loading when X does and you get sw rendering. You should fix that, I'll see if I can work out whats wrong with the other case, though UMS is a bit lower on my priority lists.
Comment 4 Wolfram Sang 2011-06-15 07:38:53 UTC
KMS works now, was a kernel misconfiguration (forgot to disable radeonfb, doh!). Interestingly, KMS does work with AGP4x while the Xorg driver can just handle AGP2x (also freezes the machine otherwise). Original bug still stands; checked the faulty commit but couldn't spot anything.
Comment 5 Michel Dänzer 2011-06-15 07:59:16 UTC
Dave, the implicated commit doesn't seem to hook up drm_pci_irq_by_busid anywhere. That's probably not intended? :) Not sure why the compiler doesn't complain about it...

Not sure that can explain anything with KMS enabled though... Wolfram, does reverting just this commit fix things with KMS enabled as well?
Comment 6 Wolfram Sang 2011-06-15 09:33:53 UTC
Created attachment 62092 [details]
Proposed fix

Thanks Michel, great pointer! The attached patch fixes the issue here; also sent it to the dri-devel list a minute ago.
Comment 7 Wolfram Sang 2011-06-17 22:12:37 UTC
Patch in mainline (45e97ab65026a3391cb2c938f834ca5db4d2e5b3)

Note You need to log in before you can comment on or make changes to this bug.