Bug 25336

Summary: KMS:X700:M26 resume from suspend/hibernate fails to initialise LVDS
Product: xorg Reporter: Tormod Volden <bugzi11.fdo.tormod>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: pedretti.fabio
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg.0.log
none
regmatch '*' after boot
none
reg dump after hibernation
none
reg dump after suspend
none
pull in lvds misc mode info
none
fix LVDS setup on r4xx chips none

Description Tormod Volden 2009-11-28 11:55:16 UTC
Created attachment 31540 [details]
Xorg.0.log

After resume from suspend or hibernate the screen is green with some very wrong x resolution or blooming with flicker. I ran radedontool regmatch and compared before and after, and when I manually regset LVDS_GEN_CNTL 0x003c00a5 the screen comes back and everything is fine.

Latest git of DDX. The Ubuntu 2.6.32-5.6-generic kernel is based on 2.6.32-rc8.
Comment 1 Tormod Volden 2009-11-28 11:56:51 UTC
I should mention that this is a huge step forward from some months ago, when resuming with KMS would just give a dead screen/laptop with no backlight.
Comment 2 Tormod Volden 2009-11-28 11:59:28 UTC
Created attachment 31541 [details]
regmatch '*' after boot
Comment 3 Tormod Volden 2009-11-28 11:59:56 UTC
Created attachment 31542 [details]
reg dump after hibernation
Comment 4 Tormod Volden 2009-11-28 12:00:28 UTC
Created attachment 31543 [details]
reg dump after suspend
Comment 5 Tormod Volden 2009-11-29 08:38:24 UTC
I see the screen goes funny (green or blooming) before power goes off, in the case of hibernation before the long write-to-disk.
Comment 6 Alex Deucher 2009-11-29 23:16:13 UTC
Created attachment 31571 [details] [review]
pull in lvds misc mode info

This patch makes sure to pull in the misc mode info for lvds (syn polarity, etc.).
Comment 7 Alex Deucher 2009-11-29 23:19:29 UTC
Created attachment 31572 [details] [review]
fix LVDS setup on r4xx chips

R4xx mobility chips use atombios, which does not store the LVDS_GEN_CNTL parameter setup like combios; rather, it's configured on fly in LVDSEncoderControl.  As such, LVDS_GEN_CNTL is set wrong on resume.  Call LVDSEncoderControl to set it properly.

This patch should fix the issue.  Another thing to try would be to try the r4xx_atom module option; this forces the use of atom calls to set modes on r4xx cards.
Comment 8 Tormod Volden 2009-11-30 09:33:26 UTC
Thanks! With the two patches it works perfectly.

Using the r4xx_atom module option did not work, the screen got extremely fuzzy (horizontal flicker).
Comment 9 Fabio Pedretti 2010-02-26 01:23:39 UTC
Fixed in 2.6.33.

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.