Bug 21077

Summary: [945GME] Switching from VT->X no longer flicker free with KMS
Product: xorg Reporter: Eric Smith <eric225125>
Component: Driver/intelAssignee: Jesse Barnes <jbarnes>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: ajax, portis24
Version: gitKeywords: regression
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
i915 platform: i915 features:
Description Flags
Don't prepare outputs & crtcs if driver has set_mode_major none

Description Eric Smith 2009-04-06 19:03:02 UTC
Switching from a VT to X used to be instant with KMS.  After this commit, http://cgit.freedesktop.org/xorg/driver/xf86-video-intel/commit/?id=bd360e7517835626bee54bec968cdc78908c6545 , my monitor flickers like it is changing modes.  Switching from X to a VT or from one VT to another VT is still instant, however.  I don't know if this commit adds a critical feature, but it seems like a regression to me.
Comment 1 Eric Smith 2009-04-06 19:03:58 UTC
Created attachment 24622 [details]
Comment 2 Eric Smith 2009-04-06 19:04:17 UTC
Created attachment 24623 [details]
Comment 3 Eric Smith 2009-04-06 19:04:35 UTC
Created attachment 24624 [details]
Comment 4 Jesse Barnes 2009-04-07 16:52:57 UTC
Created attachment 24656 [details] [review]
Don't prepare outputs & crtcs if driver has set_mode_major

Ah it must be coming from the xf86SetDesiredModes call.  The server is a bit overaggressive in disabling outputs in the KMS case.  You could try this patch to the server to see if it helps (totally untested).
Comment 5 Eric Smith 2009-04-08 09:39:46 UTC
There's a small problem with your patch:  crtc isn't defined when you use it.  I know very little programming, but I hacked it up to compile and it does indeed fix the problem.  Switching from VT -> X is now instant and flicker free! :)
Comment 6 Eric Smith 2009-04-16 10:32:02 UTC
So, since this bug is a problem with the xserver and not intel, should I submit it somewhere else?  Just for clarification, I got your patch to work by simply moving the if statement into the for loop directly below it.  This solution has been working for me without any crashes for the past week.
Comment 7 Jesse Barnes 2009-04-16 11:07:12 UTC
Yeah it's a server bug.  I'll post the patch for comments.
Comment 8 Jesse Barnes 2009-05-04 15:40:42 UTC
Fix pushed to X server master:

commit 94648bb797d94b025746c60679c584e5be2fae28
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Mon May 4 15:38:22 2009 -0700

    Don't prepare outputs & crtcs if set_mode_major is present

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.