Bug 21077 - [945GME] Switching from VT->X no longer flicker free with KMS
Summary: [945GME] Switching from VT->X no longer flicker free with KMS
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Jesse Barnes
QA Contact: Xorg Project Team
Keywords: regression
Depends on:
Reported: 2009-04-06 19:03 UTC by Eric Smith
Modified: 2009-05-04 15:40 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:

xorg.conf (1.03 KB, text/plain)
2009-04-06 19:03 UTC, Eric Smith
no flags Details
Xorg.0.log (13.58 KB, text/plain)
2009-04-06 19:04 UTC, Eric Smith
no flags Details
dmesg (15.09 KB, text/plain)
2009-04-06 19:04 UTC, Eric Smith
no flags Details
Don't prepare outputs & crtcs if driver has set_mode_major (582 bytes, patch)
2009-04-07 16:52 UTC, Jesse Barnes
no flags Details | Splinter Review

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.