Bug 30877 - [arrandale] panel flicker on mode & base switches (& hotplug polling?)
Summary: [arrandale] panel flicker on mode & base switches (& hotplug polling?)
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: DRI git
Hardware: All All
: medium normal
Assignee: Jesse Barnes
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-14 10:15 UTC by Knuth Posern
Modified: 2017-07-24 23:06 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg of boot and gdm + login of 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7" (102.55 KB, text/plain)
2011-06-09 10:55 UTC, Knuth Posern
no flags Details
dmesg for starting-powertop-testcase using 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7" (5.61 KB, text/plain)
2011-06-09 11:09 UTC, Knuth Posern
no flags Details
dmesg for starting-wine-notepad testcase using 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7" (23.67 KB, text/plain)
2011-06-09 11:25 UTC, Knuth Posern
no flags Details
dmesg for testcase STARTUP of sdl-based-game still-yet-another-sokoban (syasokoban) using 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7" (5.70 KB, text/plain)
2011-06-09 11:26 UTC, Knuth Posern
no flags Details
dmesg for testcase INTO-FULLSCREEN of sdl-based-game still-yet-another-sokoban (syasokoban) using 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7" (38.87 KB, text/plain)
2011-06-09 11:28 UTC, Knuth Posern
no flags Details
dmesg for testcase OUT-OF-FULLSCREEN of sdl-based-game still-yet-another-sokoban (syasokoban) using 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7" (49.71 KB, text/plain)
2011-06-09 11:30 UTC, Knuth Posern
no flags Details
KERNEL CONFIG 2.6.39.1 (76.88 KB, application/octet-stream)
2011-06-10 10:34 UTC, Knuth Posern
no flags Details
LSPCI -v (9.42 KB, application/octet-stream)
2011-06-10 10:37 UTC, Knuth Posern
no flags Details
XRANDR --VERBOSE (4.90 KB, text/plain)
2011-06-10 10:39 UTC, Knuth Posern
no flags Details
XRANDR --VERBOSE (4.90 KB, text/plain)
2011-06-10 10:47 UTC, Knuth Posern
no flags Details
LSPCI -v (9.42 KB, text/plain)
2011-06-10 10:48 UTC, Knuth Posern
no flags Details
KERNEL CONFIG 2.6.39.1 (76.88 KB, text/plain)
2011-06-10 10:48 UTC, Knuth Posern
no flags Details
output of ./modetest [libdrm v2.4.25] (1.04 KB, text/plain)
2011-06-15 10:49 UTC, Knuth Posern
no flags Details
avoid enabling full dp ports (1.07 KB, patch)
2011-06-15 11:09 UTC, Jesse Barnes
no flags Details | Splinter Review
flush plane changes (1.34 KB, patch)
2011-07-28 12:41 UTC, Jesse Barnes
no flags Details | Splinter Review
module reload script (584 bytes, application/x-shellscript)
2011-07-28 14:14 UTC, Jesse Barnes
no flags Details

Description Knuth Posern 2010-10-14 10:15:20 UTC
I am experiencing a regression in edp-fixes branch
of Jesse Barnes repository.

In words: With the vanilla 2.6.35.5: I have ONE flickering on load of i915, then NO flickering what-so-ever.
With the patched version from Jesse (2.6.36-rc5): I have NO flickering on load of i915, BUT:
   (a) every time I start X
   (b) when I switch BACK from a console/tty to X
   (c) Every time I run: "xbacklight -get" with xbacklight version 1.1.1
   (c) After login into gdm during my X startup script (possibly when compiz is first loaded)
   (d) When I start picasa via wine and aPassword via wine ... possibly all wine programs (to be tested)

Each flickering is small. But as I see it A LOT ... it was really much better in 2.6.35.5 where it was only ONCE.

I generated 2 videos to demonstrate what I mean:
http://posern.org/start-with-2.6.35.5_so-WITHOUT-flickering_.avi
http://posern.org/start-with-2.6.36-rc5_so-WITH-flickering_.avi
Please let me know if you need anything else TESTED!!

Thanks!

Knuth
Comment 1 Jesse Barnes 2010-10-14 10:22:16 UTC
This sounds related to the various ->detect hooks getting called.  I'll look there for clues...
Comment 2 Jesse Barnes 2011-06-08 11:25:53 UTC
Does this still happen?
Comment 3 Knuth Posern 2011-06-08 13:07:25 UTC
Hi.

Cool :))) I am all for fixing this!
For a while I also had not time. But now I am ready to invest some time to help you tracking this down.
Especially as this flickering is much worse in 2.6.38/39 than it was in 2.6.35 ... and I can't stay forever on 2.6.35 [e.g. for kvm vhostNet] :(

YES it still happens:

I just compiled 2.6.39.1:
If I am in X and switch to console -> no flickering [at least not very noticeable]. 
The moment I switch back to X: FLIIIICKER [maybe 200-500ms] black and white stripes AND reproducible after maybe 3 seconds after that it flickers a 2nd time and maybe 5-7 seconds after that it flickers a 3rd time!! 

To get a better understanding of the TIMINGS here I started:
     /usr/bin/xclock -analog -twentyfour -update 1 -render 
Then I switched to console and back:
It flickers, then 2-3 second pause, it flickers again and during this time the seconds pointer of the clock is NOT updated! but it rather shows the picture right before switching to console for 2-3 seonds (until the second flicker) and then the seconds pointer directly jumps to the actual time and then keeps ticking as it should.
The 3rd flicker does not seem to disturb the clock, just the user ;)

Also I think the 1st and 3rd flicker are longer than the 2nd one.

------------

The same flickering also seems to occur:
* When I start any wine program (e.g. the built in notepad): It flickers over the course of 10-15 seconds every 2-3 seconds. Also the seconds pointer get stuck multiple times always for 2-3 seconds jumping forward between the flickers --> which is annoying because for the same reason you can't continue typing in a console or so [ok typing works, but you don't see anything ;].
But this is ONLY on initialization --> first load/star of wine. Afterwards during the program is used - I THINK - I never saw a flicker... but honestly at the moment it is hard to remember because there is a LOT of flickering :(

* When I start powertop... yes an intel software ;>
v1.13
v1.98 on normal startup not, but on --calibrate if I remember correctly

* If I start any SDL based game, eg.: http://grayskygames.com/sokoban.html
on startup it flickers, the second pointer pauses for 2-3 seconds, it flickers again, then 5-7 seconds and a 3rd flicker - so [exactly?] like for the switch-back-from-console-flickering!
And then when switching to fullscreen [in any of the SDL based games] e.g. the sokoban: It does a resolution change... and that means 10-12 seconds of black screen interrupted by a flicker every 1-3 seonds [I think I counted 7 flickers].
Also when switching back from fullscreen: the switch happens very slowly lots of pauses in-between: You can nicely see the different steps of the video driver doing its work ;) ... e.g. you can see the fullscreen in a smaller resolution in the top right corner for 1-3 seconds and then it pops big... etc 

* On the start of gdm it also flickers 

* On login [I start screensaver maybe that triggers it]

Flicker, flicker :)

------------------------

I think a VIDEO for all these effects might be nice. And YES I can try to get it smaller than the last time :)

I would be REALLY greatful if you could try to remove all these flickers. They seem pattern-wise very similar: flicker, 2-3 seconds no screen updates, flicker 5-7 seconds pause, flicker ... just for wine and the SDL-game fullscreen they happen A LOT - but then again for wine and SDL-game fullscreen this feels very similar...

Ah yes in 2.6.35.* [e.g. 2.6.35.13] the flickering is much reduced! I would have to do another video there to let you [and me] exactly compare though.

I hope all this helps you a bit?!
Comment 4 Jesse Barnes 2011-06-08 13:10:32 UTC
Is there anything in dmesg at the time?  It almost sounds like you're getting GPU hangs...
Comment 5 Knuth Posern 2011-06-09 10:27:00 UTC
... get your popcorn ready... here are the videos:

http://posern.org/Video 1_X-to-console-and-back.avi
http://posern.org/Video 1_X-to-console-and-back_ns.avi
http://posern.org/Video 2_starting-wine.avi
http://posern.org/Video 3_powertop.avi
http://posern.org/Video 4_SDL start + fullscreen.avi
http://posern.org/Video 5_into-hibernate-and-out-of-it_normal.avi
http://posern.org/Video 5_into-hibernate-and-out-of-it_with-extra-vertical-heavy-flimmering-until-powerdown.avi
http://posern.org/Video 6_gdm-stop_gdm-start + login.avi
http://posern.org/Video 7_shutdown+restart.avi

I have one video for each of my examples that I explained in my previous posting.
Please use this posting as a reference to maybe better understanding what you are seeing. Thanks!

I always wait around 7-10 seconds to catch also these 3rd DELAYED flickers that I was talking about.

Each video is about 7-10mb 720p, no sound.
Just the "Video 5_into-hibernate-and-out-of-it_with-extra-vertical-heavy-flimmering-until-powerdown.avi" is 37mb because I used a wrong setting... but I could not easily rerecord this one and I didn't have the time to try to convert it ... but it is cool that I have this video because it shows ONE OF THE RARE CASES when on hibernate the graphic driver goes NUTS :)
you will see this crazy horizontal flickering on hibernate (instead of seeing the text-console with the output of s2disk).
But that happens SELDOMLY. ... but still :)
Comment 7 Knuth Posern 2011-06-09 10:55:31 UTC
Created attachment 47785 [details]
dmesg of boot and gdm + login of 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7"

As an explanation also for my videos:

I have setup an autologin into my gdm. Once autologged in: My login script start the xscreensaver and then compiz windowmanager is loaded.
Comment 8 Knuth Posern 2011-06-09 10:56:56 UTC
drm.debug=0x04 loglevel=7 dmesg output for the switch from x to console:

[   88.300018] [drm:intel_crtc_cursor_set], 
[   88.300022] [drm:intel_crtc_cursor_set], cursor off
[   88.916604] [drm:drm_crtc_helper_set_config], 
[   88.916608] [drm:drm_crtc_helper_set_config], [CRTC:3] [FB:29] #connectors=1 (x y) (0 0)
[   88.916620] [drm:drm_crtc_helper_set_config], [CONNECTOR:5:eDP-1] to [CRTC:3]
[   88.916637] [drm:intel_pipe_set_base_atomic], Writing base 00043000 00000000 0 0 7680
[   88.916642] [drm:intel_update_fbc], 
[   88.976223] [drm:intel_wait_for_vblank], vblank wait timed out
[   88.976229] [drm:drm_crtc_helper_set_config], 
[   88.976231] [drm:drm_crtc_helper_set_config], [CRTC:4] [NOFB]
[   88.976237] [drm:drm_crtc_helper_set_config], [CONNECTOR:5:eDP-1] to [CRTC:3]
[   88.976241] [drm:drm_crtc_helper_set_config], 
[   88.976243] [drm:drm_crtc_helper_set_config], [CRTC:3] [FB:29] #connectors=1 (x y) (0 0)
[   88.976249] [drm:drm_crtc_helper_set_config], [CONNECTOR:5:eDP-1] to [CRTC:3]
[   88.976266] [drm:drm_crtc_helper_set_config], 
[   88.976268] [drm:drm_crtc_helper_set_config], [CRTC:3] [FB:29] #connectors=1 (x y) (0 0)
[   88.976273] [drm:drm_crtc_helper_set_config], [CONNECTOR:5:eDP-1] to [CRTC:3]
Comment 9 Knuth Posern 2011-06-09 11:02:16 UTC
drm.debug=0x04 loglevel=7 dmesg output for the switch from console to x (and there I waited until after the 3rd flickering occured!)
You can see the jump from 104 to 111 thats the 7 seconds I was always talking about :)

[  101.575095] [drm:drm_mode_setcrtc], [CRTC:3]
[  101.575107] [drm:drm_mode_setcrtc], [CONNECTOR:5:eDP-1]
[  101.575112] [drm:drm_crtc_helper_set_config], 
[  101.575116] [drm:drm_crtc_helper_set_config], [CRTC:3] [FB:35] #connectors=1 (x y) (0 0)
[  101.575133] [drm:drm_crtc_helper_set_config], [CONNECTOR:5:eDP-1] to [CRTC:3]
[  101.575143] [drm:intel_pipe_set_base_atomic], Writing base 031EE000 00000000 0 0 7680
[  101.575150] [drm:intel_update_fbc], 
[  101.625765] [drm:intel_wait_for_vblank], vblank wait timed out
[  101.625878] [drm:drm_mode_getconnector], [CONNECTOR:5:?]
[  101.625882] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:5:eDP-1]
[  101.627121] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  101.654567] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  101.655818] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  101.683183] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  101.683204] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:5:eDP-1] probed modes :
[  101.683209] [drm:drm_mode_debug_printmodeline], Modeline 27:"1920x1080" 60 162840 1920 1952 1984 2481 1080 1083 1086 1095 0x48 0xa
[  101.683217] [drm:drm_mode_debug_printmodeline], Modeline 32:"1920x1080" 40 99910 1920 1952 1984 2281 1080 1083 1086 1095 0x40 0xa
[  101.683229] [drm:drm_mode_getconnector], [CONNECTOR:5:?]
[  101.683578] [drm:drm_mode_getconnector], [CONNECTOR:10:?]
[  101.683583] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:10:VGA-1]
[  101.683589] [drm:intel_ironlake_crt_detect_hotplug], ironlake hotplug adpa=0xf40018, result 0
[  101.683594] [drm:intel_crt_detect], CRT not detected via hotplug
[  101.683598] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:10:VGA-1] disconnected
[  101.683603] [drm:drm_mode_getconnector], [CONNECTOR:10:?]
[  101.683607] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:10:VGA-1]
[  101.683612] [drm:intel_ironlake_crt_detect_hotplug], ironlake hotplug adpa=0xf40018, result 0
[  101.683616] [drm:intel_crt_detect], CRT not detected via hotplug
[  101.683619] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:10:VGA-1] disconnected
[  101.683627] [drm:drm_mode_getconnector], [CONNECTOR:13:?]
[  101.683631] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:13:HDMI-A-1]
[  101.695091] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:13:HDMI-A-1] disconnected
[  101.695098] [drm:drm_mode_getconnector], [CONNECTOR:13:?]
[  101.695102] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:13:HDMI-A-1]
[  101.706509] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:13:HDMI-A-1] disconnected
[  101.706513] [drm:drm_mode_getconnector], [CONNECTOR:15:?]
[  101.706515] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:15:DP-1]
[  101.707025] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5145003e
[  101.707026] [drm:ironlake_dp_detect], DPCD: 0000
[  101.707028] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:15:DP-1] disconnected
[  101.707029] [drm:drm_mode_getconnector], [CONNECTOR:15:?]
[  101.707543] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:15:DP-1] disconnected
[  101.707545] [drm:drm_mode_getconnector], [CONNECTOR:19:?]
[  101.707547] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:19:HDMI-A-2]
[  101.805382] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:19:HDMI-A-2] disconnected
[  101.805390] [drm:drm_mode_getconnector], [CONNECTOR:19:?]
[  101.805394] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:19:HDMI-A-2]
[  101.905190] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:19:HDMI-A-2] disconnected
[  101.905203] [drm:drm_mode_getconnector], [CONNECTOR:22:?]
[  101.905207] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:22:HDMI-A-3]
[  102.703486] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:22:HDMI-A-3] disconnected
[  102.703490] [drm:drm_mode_getconnector], [CONNECTOR:22:?]
[  102.703492] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:22:HDMI-A-3]
[  103.501833] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:22:HDMI-A-3] disconnected
[  103.501858] [drm:drm_mode_getconnector], [CONNECTOR:24:?]
[  103.501861] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:24:DP-2]
[  103.502372] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5145003e
[  103.502374] [drm:ironlake_dp_detect], DPCD: 0000
[  103.502376] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:24:DP-2] disconnected
[  103.502377] [drm:drm_mode_getconnector], [CONNECTOR:24:?]
[  103.502379] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:24:DP-2]
[  103.502888] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5145003e
[  103.502890] [drm:ironlake_dp_detect], DPCD: 0000
[  103.502891] [drm:drm_helper_probe_single_connector_modes], [CONNECTOR:24:DP-2] disconnected
[  103.508553] [drm:intel_crtc_cursor_set], 
[  104.115053] [drm:drm_mode_addfb], [FB:36]
[  111.646175] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  111.673648] [drm:i2c_algo_dp_aux_xfer], dp_aux_xfer return 2
[  111.673656] [drm:output_poll_execute], [CONNECTOR:5:eDP-1] status updated from 1 to 1
[  111.673663] [drm:intel_ironlake_crt_detect_hotplug], ironlake hotplug adpa=0xf40018, result 0
[  111.673668] [drm:intel_crt_detect], CRT not detected via hotplug
[  111.673672] [drm:output_poll_execute], [CONNECTOR:10:VGA-1] status updated from 2 to 2
[  111.685133] [drm:output_poll_execute], [CONNECTOR:13:HDMI-A-1] status updated from 2 to 2
[  111.685648] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5145003e
[  111.685652] [drm:ironlake_dp_detect], DPCD: 0000
[  111.685657] [drm:output_poll_execute], [CONNECTOR:15:DP-1] status updated from 2 to 2
[  111.784671] [drm:output_poll_execute], [CONNECTOR:19:HDMI-A-2] status updated from 2 to 2
[  112.582974] [drm:output_poll_execute], [CONNECTOR:22:HDMI-A-3] status updated from 2 to 2
[  112.583490] [drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x5145003e
[  112.583495] [drm:ironlake_dp_detect], DPCD: 0000
[  112.583499] [drm:output_poll_execute], [CONNECTOR:24:DP-2] status updated from 2 to 2
Comment 10 Knuth Posern 2011-06-09 11:09:07 UTC
Created attachment 47786 [details]
dmesg for starting-powertop-testcase using 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7"
Comment 11 Jesse Barnes 2011-06-09 11:10:59 UTC
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_d
index 81a9059..0814457 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1910,9 +1910,9 @@ intel_pipe_set_base_atomic(struct drm_crtc *crtc, struct d
                      Start, Offset, x, y, fb->pitch);
        I915_WRITE(DSPSTRIDE(plane), fb->pitch);
        if (INTEL_INFO(dev)->gen >= 4) {
-               I915_WRITE(DSPSURF(plane), Start);
                I915_WRITE(DSPTILEOFF(plane), (y << 16) | x);
                I915_WRITE(DSPADDR(plane), Offset);
+               I915_WRITE(DSPSURF(plane), Start);
        } else
                I915_WRITE(DSPADDR(plane), Start + Offset);
        POSTING_READ(reg);

Wonder if the above has any effect?
Comment 12 Knuth Posern 2011-06-09 11:25:33 UTC
Created attachment 47787 [details]
dmesg for starting-wine-notepad testcase using 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7"
Comment 13 Knuth Posern 2011-06-09 11:26:58 UTC
Created attachment 47788 [details]
dmesg for testcase STARTUP of sdl-based-game still-yet-another-sokoban (syasokoban) using 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7"
Comment 14 Knuth Posern 2011-06-09 11:28:14 UTC
Created attachment 47789 [details]
dmesg for testcase INTO-FULLSCREEN of sdl-based-game still-yet-another-sokoban (syasokoban) using 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7"

After being in fullscreen I waited about 10 seconds to capture the 3 flickering and then I switched to console in order to do capture the dmesg
Comment 15 Knuth Posern 2011-06-09 11:30:22 UTC
Created attachment 47790 [details]
dmesg for testcase OUT-OF-FULLSCREEN of sdl-based-game still-yet-another-sokoban (syasokoban) using 2.6.39.1 vanilla kernel with "drm.debu=0x04 loglevel=7"

As I was on the console (see attachment #47789 [details]) I switched back to X, then left fullscreen [and then captured dmesg within x]
Comment 16 Knuth Posern 2011-06-09 12:20:38 UTC
(In reply to comment #11)

I manually applied it to a vanilla 2.6.39.1 -->
2.6.39.1-nogo-pixel-g51a14a1-dirty #1 

but no visible difference [I just checked the x-console-x tescase and the wine testcase].
Comment 17 Jesse Barnes 2011-06-10 09:14:52 UTC
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_d
index 81a9059..efea5ee 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4090,6 +4090,8 @@ static void ironlake_update_wm(struct drm_device *dev)
        int fbc_wm, plane_wm, cursor_wm;
        unsigned int enabled;
 
+       return;
+
        enabled = 0;
        if (g4x_compute_wm0(dev, 0,
                            &ironlake_display_wm_info,

How about this one?  any difference?
Comment 18 Knuth Posern 2011-06-10 10:06:40 UTC
So the idea is to return right away from ironlake_update_wm.

-->

I tested it:
If, then its worth... but I think its the same --> no change.
Comment 19 Knuth Posern 2011-06-10 10:34:56 UTC
Created attachment 47818 [details]
KERNEL CONFIG 2.6.39.1
Comment 20 Knuth Posern 2011-06-10 10:37:34 UTC
Created attachment 47819 [details]
LSPCI -v
Comment 21 Knuth Posern 2011-06-10 10:39:13 UTC
Created attachment 47820 [details]
XRANDR --VERBOSE
Comment 22 Knuth Posern 2011-06-10 10:47:43 UTC
Created attachment 47821 [details]
XRANDR --VERBOSE
Comment 23 Knuth Posern 2011-06-10 10:48:20 UTC
Created attachment 47822 [details]
LSPCI -v
Comment 24 Knuth Posern 2011-06-10 10:48:51 UTC
Created attachment 47823 [details]
KERNEL CONFIG 2.6.39.1
Comment 25 Knuth Posern 2011-06-10 11:01:50 UTC
I tried [ontop of vanilla 2.6.39.1]:

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index d03fc05..ec7db1d 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -435,6 +435,8 @@ intel_crt_detect(struct drm_connector *connector, bool force)
        int dpms_mode;
        enum drm_connector_status status;

+    return connector_status_disconnected;
+
        if (I915_HAS_HOTPLUG(dev)) {
                if (intel_crt_detect_hotplug(connector)) {
                        DRM_DEBUG_KMS("CRT detected via hotplug\n");

-->

no improvement
Comment 26 Knuth Posern 2011-06-10 11:22:40 UTC
This is what I tried:

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a4d8031..4c214aa 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1609,6 +1609,8 @@ intel_dp_detect(struct drm_connector *connector, bool force)
        enum drm_connector_status status;
        struct edid *edid = NULL;
 
+    return true;
+
        intel_dp->has_audio = false;
 
        if (HAS_PCH_SPLIT(dev))
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index f289b86..0bc3ff6 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -217,6 +217,8 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
        struct edid *edid;
        enum drm_connector_status status = connector_status_disconnected;
 
+    return connector_status_disconnected;
+
        intel_hdmi->has_hdmi_sink = false;
        intel_hdmi->has_audio = false;
        edid = drm_get_edid(connector,

--> 2.6.39.1-nogo-pixel-g26b4039

Here are the results:

fullHD is gone, the flickering is still there, but the HANGS are gone!
which makes the flickering MUCH more bearable :)
but the 1024 resolution sucks... even though xrandr still LISTS the fullHD...
also before X started: when the console-fb was initialized it jumped to 
the right resolution [fullHD, from what I can tell], BUT it does only uses the 
1024x768 square in the top left corner --> around is unused blank

So the "success": the 2-3 seconds (GPU?) HANG between 1st and 2nd flicker is GONE! ... where the second pointer of xclock would not move anymore.
Comment 27 Knuth Posern 2011-06-10 12:54:07 UTC
//// IDEA [from jbarnes] ////
You could make it only return connected if (is_edp(intel_dp)) 
and otherwise return disconnected
that  might get your resolution back at least


diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a4d8031..85a6deb 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1538,10 +1538,13 @@ ironlake_dp_detect(struct intel_dp *intel_dp)
`
 >--/* Can't disconnect eDP, but you can close the lid... */
 >--if (is_edp(intel_dp)) {
+>--    return connector_status_connected;
 >-->---status = intel_panel_detect(intel_dp->base.base.dev);
 >-->---if (status == connector_status_unknown)
 >-->--->---status = connector_status_connected;
 >-->---return status;
+   } else {
+         return connector_status_disconnected;
 >--}
`
 >--status = connector_status_disconnected;
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index f289b86..0bc3ff6 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -217,6 +217,8 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
 >--struct edid *edid;
 >--enum drm_connector_status status = connector_status_disconnected;
`
+    return connector_status_disconnected;
+
 >--intel_hdmi->has_hdmi_sink = false;
 >--intel_hdmi->has_audio = false;
 >--edid = drm_get_edid(connector,

-->

static enum drm_connector_status
ironlake_dp_detect(struct intel_dp *intel_dp)
{
    enum drm_connector_status status;

    /* Can't disconnect eDP, but you can close the lid... */
    if (is_edp(intel_dp)) {
        return connector_status_connected;
        status = intel_panel_detect(intel_dp->base.base.dev);
        if (status == connector_status_unknown)
            status = connector_status_connected;
        return status;
    } else {
         return connector_status_disconnected;
    }
...

--> 2.6.39.1-nogo-pixel-g1a492da

/// RESULT ////:
Jesse, you were right: fullHD is back
So we have a small win: The lag is decreased - I double checked with xclock :) ... and its not 2-3 seconds, but still around 500ms (maybe up to 1000ms)
Comment 28 Knuth Posern 2011-06-10 13:03:25 UTC
ADDENDUM to the RESULTS:

The delay/hang is really reduced! before it always took maybe 10 seconds to startup wine, now it takes maybe 1-2 [mostly because of the flickering which 
now happens condensed at once but the 7seconds later delayed 3rd flickering is still there. So the flicker pattern did not change, just the timing]
Comment 29 Knuth Posern 2011-06-15 10:49:21 UTC
Created attachment 48009 [details]
output of ./modetest [libdrm v2.4.25]
Comment 30 Jesse Barnes 2011-06-15 11:09:40 UTC
Created attachment 48010 [details] [review]
avoid enabling full dp ports

New theory: this machine doesn't expose a DP port attached to the Intel GPU, and we're failing in all sorts of ways when we try to do things with the non-embedded DP.  This patch should avoid any non-eDP ports.  With luck, it'll fix both the delay and flicker in your case...
Comment 31 Knuth Posern 2011-06-15 13:58:45 UTC
Here is what I tried [your "avoid enabling full dp ports" patch for vanilla 2.6.39.1]:

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a4d8031..e8207fb 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1642,6 +1642,7 @@ static int intel_dp_get_modes(struct drm_connector *connector)
        /* We should parse the EDID data and find out if it has an audio sink
         */

+#if 0  
        ret = intel_ddc_get_modes(connector, &intel_dp->adapter);
        if (ret) {
                if (is_edp(intel_dp) && !dev_priv->panel_fixed_mode) {
@@ -1658,6 +1659,7 @@ static int intel_dp_get_modes(struct drm_connector *connector)
                
                return ret;
        }
+#endif 
        
        /* if eDP has no EDID, try to use fixed panel mode from VBT */
        if (is_edp(intel_dp)) {
@@ -1891,6 +1893,9 @@ intel_dp_init(struct drm_device *dev, int output_reg)
                intel_encoder->type = INTEL_OUTPUT_DISPLAYPORT;
        }

+    if (!is_edp(intel_dp))
+        return;
+       
        connector = &intel_connector->base;
        drm_connector_init(dev, connector, &intel_dp_connector_funcs, type);
        drm_connector_helper_add(connector, &intel_dp_connector_helper_funcs);

-->

2.6.39.1-nogo-pixel-g0387da7

RESULT: unchanged to original problem: both flicker + delay are still there
Tested with X-start, Console-switch and "xrandr --verbose".

Sorry :/
Comment 32 Jesse Barnes 2011-07-28 12:41:57 UTC
Created attachment 49684 [details] [review]
flush plane changes

This might help avoid some problems...
Comment 33 Jesse Barnes 2011-07-28 14:14:40 UTC
Created attachment 49687 [details]
module reload script

You can try something like this (be sure to edit the paths) to reload the module instead of rebooting.
Comment 34 Knuth Posern 2011-07-28 17:47:06 UTC
The regression: On load of udev (init of fb): screen went blank (without backlight), then seconds later backlight went on, then seconds later backlight went off, and on again and off again and then it stayed off.
Computer did NOT hang.

I bisected the regression that was first noticed today on the drm-intel-next branch from keithp master repository.

 root@seven /usr/src/linux # git bisect good
97cdd7101079adc3c626d159c62d43de949516c8 is the first bad commit
commit 97cdd7101079adc3c626d159c62d43de949516c8
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Jul 12 17:38:00 2011 -0400

    drm/i915/dp: Zero the DPCD data before connection probe

    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

:040000 040000 5682bc4d52b340b0f01207eefabae4d589bcc139 dd8f20492763808d68495e1165ece56fa75eff90 M      drivers
Comment 35 Jesse Barnes 2012-04-18 11:10:17 UTC
This one is probably fixed now; testing on my Dell E6510 now to make sure.
Comment 36 Jesse Barnes 2012-04-18 11:46:25 UTC
I think this is fixed now by either one of the many eDP fixes that have gone in since this was opened, or by one of the many load detect/EDID fetch fixes.

I don't see it on my E6510 at least.
Comment 37 Knuth Posern 2012-04-18 17:33:03 UTC
How can I test this?

Because I still have the problem with:
Linux 3.3.1-5.fc16.x86_64 #1 SMP Tue Apr 10 19:56:52 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Comment 38 Jesse Barnes 2012-04-18 17:35:38 UTC
I was using the drm-intel-next-queued branch from git://people.freedesktop.org/~danvet/drm-intel, can you give it a try?


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.