Bug 15643 - [945G] can't bring back console screen after s3
[945G] can't bring back console screen after s3
Status: VERIFIED FIXED
Product: xorg
Classification: Unclassified
Component: Driver/intel
git
x86 (IA32) Linux (All)
: medium normal
Assigned To: Jesse Barnes
Xorg Project Team
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-22 01:46 UTC by Hong Liu
Modified: 2008-12-21 19:36 UTC (History)
3 users (show)

See Also:


Attachments
xorg.0.log (69.07 KB, text/plain)
2008-08-14 18:27 UTC, liuhaien
no flags Details
pre-suspend.out (6.87 KB, text/plain)
2008-09-26 18:59 UTC, liuhaien
no flags Details
post-resume.out (6.88 KB, text/plain)
2008-09-26 18:59 UTC, liuhaien
no flags Details
restore CRT port after VGA (839 bytes, patch)
2008-09-30 13:15 UTC, Jesse Barnes
no flags Details | Splinter Review
pre-suspend.out2 (6.90 KB, text/plain)
2008-10-05 23:56 UTC, liuhaien
no flags Details
post-resume.out2 (6.88 KB, text/plain)
2008-10-05 23:56 UTC, liuhaien
no flags Details
post-resume.out2 (6.88 KB, text/plain)
2008-10-06 00:03 UTC, liuhaien
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hong Liu 2008-04-22 01:46:58 UTC
the 945G machine can't resume back on console mode, but seems work in X mode...

users can only remote access the machine after resume as nothing
can be seen on the screen. This only happens in console mode and
"vbetool post" can bring the screen back.
Comment 1 Michael Fu 2008-06-23 18:06:11 UTC
hong, is this still the valid? 
Comment 2 Jesse Barnes 2008-06-23 18:54:54 UTC
This should have been fixed by the drm suspend/resume code as of kernel 2.6.25...  There were some bugs that were fixed more recently though.  Also, the drm code doesn't handle dvo, sdvo or tv outputs yet, so those won't be restored either.
Comment 3 Gordon Jin 2008-06-28 21:49:02 UTC
Haien, can you retest this on 945g? Make sure to use a new kernel after 2.6.25.
Comment 4 liuhaien 2008-07-31 00:28:35 UTC
(In reply to comment #3)
> Haien, can you retest this on 945g? Make sure to use a new kernel after 2.6.25.
> 

it can reproduce on our 945g with kernel 2.6.26-rc5.
Comment 5 Jesse Barnes 2008-08-04 11:46:27 UTC
Reassign Hong's bugs back to the default for triage.
Comment 6 liuhaien 2008-08-04 23:58:17 UTC
we retest it on other platform,now it also happens on 915gm,945gm,q965,gm45 and q45.
Comment 7 Gordon Jin 2008-08-14 18:16:20 UTC
Haien, please attach log for 945g. Is VGA or DVI used?
Comment 8 liuhaien 2008-08-14 18:27:52 UTC
Created attachment 18289 [details]
xorg.0.log
Comment 9 Wang Zhenyu 2008-08-14 20:46:33 UTC
Note that X is _not_ involved in this bug. So you should only do drm/i915 module loading and "echo mem > /sys/power/state" after login.

This 945G only has VGA connect right?

Just tested 2.6.26 on my 945GM on which S3 works fine.
Comment 10 liuhaien 2008-08-14 22:45:41 UTC
(In reply to comment #9)
> Note that X is _not_ involved in this bug. So you should only do drm/i915
> module loading and "echo mem > /sys/power/state" after login.
> 
> This 945G only has VGA connect right?
> 
> Just tested 2.6.26 on my 945GM on which S3 works fine.
> 

firstly ,our 945g only has VGA connect.
secondly "echo mem >/sys/power/state" with or without running "modprobe drm && modprobe i915 ",S3 both cannot bring back,and we cannot connect it by remote now.it seems like that system hangs.
Comment 11 Jesse Barnes 2008-08-20 14:23:41 UTC
Ok that sounds like a different issue, and this is working fine for Zhenyu, so I'm going to close.  If you get suspend/resume working on your test machine again and find that this problem comes up again, please re-open.
Comment 12 liuhaien 2008-08-25 23:25:07 UTC
we find this issue still exists on our 945g.
Comment 13 Jesse Barnes 2008-09-23 18:41:52 UTC
Does it still crash?  Or do you just not see the console?  It would be good to get register dumps from before & after the suspend/resume procedure.
Comment 14 Michael Fu 2008-09-25 00:51:05 UTC
(In reply to comment #12)
> we find this issue still exists on our 945g.
> 

haien, is this 945G the one we think has HW issue? how about S3 now on other machines you mentioned above? I'm asking because you didn't say specifically this bug exist on that 945G only... thanks.
Comment 15 liuhaien 2008-09-25 22:20:10 UTC
(In reply to comment #14)
> (In reply to comment #12)
> > we find this issue still exists on our 945g.
> > 
> 
> haien, is this 945G the one we think has HW issue? how about S3 now on other
> machines you mentioned above? I'm asking because you didn't say specifically
> this bug exist on that 945G only... thanks.
> 

yes.this issue only happens on 945G the one we think has HW issue.and works well on other machines eg.915gm 945gm and GM45.
Comment 16 Michael Fu 2008-09-26 01:05:57 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > (In reply to comment #12)
> > > we find this issue still exists on our 945g.
> > > 
> > 
> > haien, is this 945G the one we think has HW issue? how about S3 now on other
> > machines you mentioned above? I'm asking because you didn't say specifically
> > this bug exist on that 945G only... thanks.
> > 
> 
> yes.this issue only happens on 945G the one we think has HW issue.and works
> well on other machines eg.915gm 945gm and GM45.
> 

haien, Does this machine can come back in X? The bug said can come back on console mode. Need confirm. thanks.
Comment 17 liuhaien 2008-09-26 18:55:23 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > (In reply to comment #14)
> > > (In reply to comment #12)
> > > > we find this issue still exists on our 945g.
> > > > 
> > > 
> > > haien, is this 945G the one we think has HW issue? how about S3 now on other
> > > machines you mentioned above? I'm asking because you didn't say specifically
> > > this bug exist on that 945G only... thanks.
> > > 
> > 
> > yes.this issue only happens on 945G the one we think has HW issue.and works
> > well on other machines eg.915gm 945gm and GM45.
> > 
> 
> haien, Does this machine can come back in X? The bug said can come back on
> console mode. Need confirm. thanks.
> 

it can come back in X,the issue happens as below steps:
1.xinit&
2.chvt 1
3.suspend->resume
 
Comment 18 liuhaien 2008-09-26 18:59:23 UTC
Created attachment 19251 [details]
pre-suspend.out
Comment 19 liuhaien 2008-09-26 18:59:44 UTC
Created attachment 19252 [details]
post-resume.out
Comment 20 Jesse Barnes 2008-09-30 13:13:12 UTC
Hm, the differences are small:


--- pre-suspend.out     2008-09-30 13:01:09.000000000 -0700                    
+++ post-resume.out     2008-09-30 13:01:16.000000000 -0700                    
@@ -8,9 +8,9 @@                                                                
 (II):        DSPCLK_GATE_D: 0x00000000 (clock gates disabled:)                
 (II):       RENCLK_GATE_D1: 0x00000000                                        
 (II):       RENCLK_GATE_D2: 0x00000000                                        
-(II):                SDVOB: 0x00480000 (disabled, pipe A, stall disabled, not detected)                                                                        
-(II):                SDVOC: 0x00480000 (disabled, pipe A, stall disabled, not detected)                                                                        
-(II):              SDVOUDI: 0x00000000                                         
+(II):                SDVOB: 0x00300000 (disabled, pipe A, stall disabled, not detected)                                                                        
+(II):                SDVOC: 0x00300000 (disabled, pipe A, stall disabled, not detected)                                                                        
+(II):              SDVOUDI: 0x00000004                                         
 (II):               DSPARB: 0x00001d9c                                         
 (II):               DSPFW1: 0x00000000                                         
 (II):               DSPFW2: 0x00000000                                         
@@ -18,8 +18,8 @@                                                               
 (II):                 ADPA: 0x80008018 (enabled, pipe A, +hsync, +vsync)       
 (II):                 LVDS: 0x00000000 (disabled, pipe A, 18 bit, 1 channel)   
 (II):                 DVOA: 0x00000000 (disabled, pipe A, no stall, -hsync, -vsync)                                                                            
-(II):                 DVOB: 0x00480000 (disabled, pipe A, no stall, -hsync, -vsync)                                                                            
-(II):                 DVOC: 0x00480000 (disabled, pipe A, no stall, -hsync, -vsync)                                                                            
+(II):                 DVOB: 0x00300000 (disabled, pipe A, no stall, -hsync, -vsync)                                                                            
+(II):                 DVOC: 0x00300000 (disabled, pipe A, no stall, -hsync, -vsync)
 (II):          DVOA_SRCDIM: 0x00000000
 (II):          DVOB_SRCDIM: 0x00000000
 (II):          DVOC_SRCDIM: 0x00000000
@@ -28,7 +28,7 @@
 (II):         PFIT_CONTROL: 0x00000000
 (II):      PFIT_PGM_RATIOS: 0x00000000
 (II):      PORT_HOTPLUG_EN: 0x00000020
-(II):    PORT_HOTPLUG_STAT: 0x00000b00
+(II):    PORT_HOTPLUG_STAT: 0x00000000
 (II):             DSPACNTR: 0x18000000 (disabled, pipe A)
 (II):           DSPASTRIDE: 0x00000c80 (3200 bytes)
 (II):              DSPAPOS: 0x00000000 (0, 0)
@@ -38,7 +38,7 @@
 (II):          DSPATILEOFF: 0x00000000
 (II):            PIPEACONF: 0x80000000 (enabled, single-wide)
 (II):             PIPEASRC: 0x031f0257 (800, 600)
-(II):            PIPEASTAT: 0x00000000 (status:)
+(II):            PIPEASTAT: 0x80000000 (status: FIFO_UNDERRUN)
 (II):                 FPA0: 0x00021008 (n = 2, m1 = 16, m2 = 8)
 (II):                 FPA1: 0x00031108 (n = 3, m1 = 17, m2 = 8)
 (II):               DPLL_A: 0x84200003 (enabled, non-dvo, VGA, default clock, DAC/serial mode, p1 = 6, p2 = 10, SDVO mult 1)

but you say that switching back to X brings up a display?  That might mean we're not restoring VGA mode correctly...  
Comment 21 Jesse Barnes 2008-09-30 13:15:00 UTC
Created attachment 19317 [details] [review]
restore CRT port after VGA

Can you give this patch a try?  We may not be restoring ports in the right order; this makes us restore the CRT state only after VGA has been enabled.
Comment 22 liuhaien 2008-10-05 23:54:25 UTC
this issue still exists with your patch ,and the output of reg_dumper for this patch is attached,see pre-suspend.out2 and post-resume.out2.
Comment 23 liuhaien 2008-10-05 23:56:01 UTC
Created attachment 19398 [details]
pre-suspend.out2
Comment 24 liuhaien 2008-10-05 23:56:38 UTC
Created attachment 19399 [details]
post-resume.out2
Comment 25 liuhaien 2008-10-06 00:03:19 UTC
Created attachment 19400 [details]
post-resume.out2
Comment 26 liuhaien 2008-11-11 21:33:20 UTC
this issue still exists against:
Libdrm:	master930c0e7cf4f4776f7a69e7acc6fedeed7addb235
Mesa:	master09623fe551771031ed02ba7542c94bdbdd83ecec
Xf86_video_intel:	master65cd0fbb018b2c18f1571dc0924c7d92eaf794a
Xserver:	master31005efb1bb6be5a892ff905f754109dc3fa8fe6
GEM_kernel:       (drm-intel-next)2db46b5668dfed59acacd75dfc49ecf947ea5aeb
Comment 27 Jesse Barnes 2008-12-18 13:19:38 UTC
Does this still happen with the latest -next tree?  Maybe someone with access to the machine can fix it quickly; it's probably just an ordering problem in the i915 resume function.
Comment 28 liuhaien 2008-12-21 19:15:36 UTC
(In reply to comment #27)
> Does this still happen with the latest -next tree?  Maybe someone with access
> to the machine can fix it quickly; it's probably just an ordering problem in
> the i915 resume function.
> 

it works against:
Libdrm:		(master)0243c9f801a35de3465a0321c02f18a4d07ce5b8
Mesa_stable:		(intel-2008-q4)f96baeaac3ef41260ac3975750627ece073fdce0
Xserver_stable:	(server-1.6-branch)32e81074b967716865aef08b66ec29caf0fec2c5
Xf86_video_intel_stable:(xf86-video-intel-2.6-branch)
                         83f3c376b5942e134047a220e6e5f2432ffc492c
GEM_kernel:       (for-airlied)0fbdb7c9455a05eb89f358f0eb66fb8ab094a0c5

Comment 29 Michael Fu 2008-12-21 19:31:15 UTC
mark fixed then. 
Comment 30 liuhaien 2008-12-21 19:36:14 UTC
verified.