Bug 29808 - EXA Acceleration on Evergreen results in lockup of X
Summary: EXA Acceleration on Evergreen results in lockup of X
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-25 17:49 UTC by Matthew Cox
Modified: 2010-10-15 12:30 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Backtrace from hung X server. (1.69 KB, text/plain)
2010-08-25 17:49 UTC, Matthew Cox
no flags Details
dmesg dump after the hang (39.86 KB, text/x-log)
2010-08-25 17:55 UTC, Matthew Cox
no flags Details
X server log (54.47 KB, text/x-log)
2010-08-25 17:55 UTC, Matthew Cox
no flags Details

Description Matthew Cox 2010-08-25 17:49:25 UTC
Created attachment 38160 [details]
Backtrace from hung X server.

Upon starting X with the evergreen hardware acceleration enabled (HD 5770) the server immediately locks up. Switching to a different virtual console does not work. Remotely logging in and killing X does not restore the console, a full restart is required.

Relevent versions:
xf86-video-ati: 141cbc283fddeb67c2a6c47a0f0f5c2aa2bfb430
mesa: b2872ea353efd117fcc4d22f0ca66a26f95a14c4
libdrm: 8a76244a0fd09d0e3298fe68af812d7eaa4dbcb5
kernel 2.6.35.3
xorg server 1.9.0

The git versions above are the latest HEADs as of about 8:15 pm EDT, Aug 25 2010.

I've provided a backtrace obtained from the hung server.

I mentioned EXA in the summary as it appears that the problem originates in an EXA call.
Comment 1 Matthew Cox 2010-08-25 17:55:17 UTC
Created attachment 38161 [details]
dmesg dump after the hang

The final line is a drm error about an invalid framebuffer id.
Comment 2 Matthew Cox 2010-08-25 17:55:52 UTC
Created attachment 38162 [details]
X server log
Comment 3 Alex Deucher 2010-08-25 18:42:10 UTC
The GPU still hangs on many cards.  Haven't sorted out why yet.
Comment 4 Matthew Cox 2010-08-31 14:49:27 UTC
I've determined how to prevent and induce this bug. If I run X with fglrx (catalyst 10.8) and then remove it from my system (the module, the DDX, everything), then modprobe radeon with modeset=1, and install mesa and xf86-video-ati and libdrm from git, then X runs successfully with acceleration. This persists across multiple reboots.

If I then shutdown the system and start it back up, the GPU locks up immediately.

I suspect that fglrx is leaving a register in some magical state that persists across reboots.
Comment 5 Alex Deucher 2010-09-02 21:38:14 UTC
This should be fixed with the latest ddx code from git and this drm patch:
http://lists.freedesktop.org/archives/dri-devel/2010-September/003531.html
Comment 6 Jure Repinc 2010-09-03 07:41:44 UTC
I tried to apply the DRM patch to Linux kernel from Git and it didn't apply
# patch -p1 < evergreen_drm.patch 
patching file drivers/gpu/drm/radeon/evergreen.c
Hunk #1 succeeded at 675 with fuzz 1 (offset -435 lines).
Hunk #2 FAILED at 1202.
1 out of 2 hunks FAILED -- saving rejects to file drivers/gpu/drm/radeon/evergreen.c.rej
patching file drivers/gpu/drm/radeon/r600.c
Hunk #1 FAILED at 2120.
1 out of 1 hunk FAILED -- saving rejects to file drivers/gpu/drm/radeon/r600.c.rej

drivers/gpu/drm/radeon/evergreen.c.rej:
--- drivers/gpu/drm/radeon/evergreen.c
+++ drivers/gpu/drm/radeon/evergreen.c
@@ -1202,7 +1239,7 @@
        rdev->cp.rptr = RREG32(CP_RB_RPTR);
        rdev->cp.wptr = RREG32(CP_RB_WPTR);

-       r600_cp_start(rdev);
+       evergreen_cp_start(rdev);
        rdev->cp.ready = true;
        r = radeon_ring_test(rdev);
        if (r) {

drivers/gpu/drm/radeon/r600.c.rej
--- drivers/gpu/drm/radeon/r600.c
+++ drivers/gpu/drm/radeon/r600.c
@@ -2120,10 +2120,7 @@
        }
        radeon_ring_write(rdev, PACKET3(PACKET3_ME_INITIALIZE, 5));
        radeon_ring_write(rdev, 0x1);
-       if (rdev->family >= CHIP_CEDAR) {
-               radeon_ring_write(rdev, 0x0);
-               radeon_ring_write(rdev, rdev->config.evergreen.max_hw_contexts - 1);
-       } else if (rdev->family >= CHIP_RV770) {
+       if (rdev->family >= CHIP_RV770) {
                radeon_ring_write(rdev, 0x0);
                radeon_ring_write(rdev, rdev->config.rv770.max_hw_contexts - 1);
        } else {
Comment 7 Jure Repinc 2010-09-03 08:26:45 UTC
I now manualy changed the source files for the two failed hunks and recompiled the kernel and DDX driver and don't get the freeze anymore on my laptop with ATI Mobility Radeon HD 5470.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.