Bug 11287

Summary: vt switch is broken in recent git
Product: xorg Reporter: Andrew Randrianasulu <randrik>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
X.org log file with bad driver
none
X.org log with good driver none

Description Andrew Randrianasulu 2007-06-16 15:58:27 UTC
software:

kernel - 2.6.19.7
drm  - git from 15 Jun 2007
Xorg Xserver - X Window System Version 1.3.0
DDX (2d) driver -  xf86-video-ati from today (17 Jun 2007) git.

After install new ati driver whole system don't survive simple VT swith - complete hang, no ctrl-alt-bs, no SysRq key, music stopped playing, i can only hard-reset my machine.

Video hardware:

01:00.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200 SE] (rev 01) (prog-if 00 [VGA])
        Subsystem: Hightech Information System Ltd. Excalibur 9200SE VIVO 128M
        Flags: bus master, 66Mhz, medium devsel, latency 32, IRQ 20
        Memory at d0000000 (32-bit, prefetchable) [size=128M]
        I/O ports at c800 [size=256]
        Memory at dfdf0000 (32-bit, non-prefetchable) [size=64K]
        Expansion ROM at dfdc0000 [disabled] [size=128K]
        Capabilities: [58] AGP version 2.0
        Capabilities: [50] Power Management version 2

git-bisect found first bad commit:

c292fc64499ff4cc135c07deda99cf4169f8fef4


RADEON: make sure RADEON_LVDS_ON is cleared when turning LVDS off
- fixes bug 3483

Unfortunately, this one open new bug for me.

X.org log will follow in next post
Comment 1 Andrew Randrianasulu 2007-06-16 15:59:41 UTC
Created attachment 10332 [details] [review]
X.org log file with bad driver
Comment 2 Andrew Randrianasulu 2007-06-16 16:11:30 UTC
Created attachment 10333 [details] [review]
X.org log with good driver
Comment 3 Michel Dänzer 2007-06-18 08:47:10 UTC
Alex, any ideas? I'd noticed some freezes on switching back to the server, and although I haven't had time to track them down, that commit seems to fit the timeframe for me as well.
Comment 4 Alex Deucher 2007-06-18 10:21:24 UTC
Not sure.  No freezes for me.  Perhaps some cards don't like having the RADEON_LVDS_ON bit messed with?  It seems some chips need it for proper LVDS blanking while others do not.  Maybe it should be a driver option?  I need to change RADEONDisableDisplays() to only touch LVDS on mobility chips; that may fix Andrew's issue (although if that were the case f19a6f7ee5bf4ec632e7813359f167599c08e823 should have broken things for him rather than c292fc64499ff4cc135c07deda99cf4169f8fef4).
Comment 5 Alex Deucher 2007-06-18 20:46:26 UTC
Andrew, I've just committed a patch (b72ff160f908bf3aa9f64705377e92d80360a4f7) to not touch LVDS on non-mobility radeons.  Do you still get lockups with git master?
Comment 6 Andrew Randrianasulu 2007-06-18 21:59:13 UTC
I've just noticed one thing - lockups was not always after first switch from and back to X. Sometimes i need few switches back and forth - but 4 at max.

I do new git bisect and result is:

dcb64a4d3947e5a9fbda4b72e29a5b6102370f07 is first bad commit
commit dcb64a4d3947e5a9fbda4b72e29a5b6102370f07
Author: Dave Airlie <airlied@linux.ie>
Date:   Sun Jun 3 17:10:49 2007 +1000

    radeon: disable vbl interrupts when no 3d is running on a new enough drm

with driver up to 4c61c0ee91a2ffeefce30972a584486f1df1d1ae i can switch VTs at least ten times without lockup.... will try more ...
Comment 7 Andrew Randrianasulu 2007-06-20 23:34:52 UTC

I moved RADEONDRISetVBlankInterrupt (pScrn, TRUE); right before  RADEONDRIResume(pScrn->pScreen); in radeon_driver.c (function RADEONEnterVT)

and i can jump to console and back to X without problem, even with spinning glxgears.
Comment 8 Alex Deucher 2007-06-21 22:04:40 UTC
Fix committed.  Thanks for tracking it down.
92e65d5e0d6817ff4c9a08020a0a9b3a8c3c98b0

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.