Bug 74628 - [eDP regression] blank screen on boot
Summary: [eDP regression] blank screen on boot
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: highest blocker
Assignee: Paulo Zanoni
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-06 17:22 UTC by Chris Wilson
Modified: 2016-11-22 08:59 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg dump with drm.debug=0xe (114.44 KB, text/plain)
2014-02-06 19:51 UTC, Patrik Jakobsson
no flags Details
Patch with debugging option (7.23 KB, patch)
2014-02-06 21:43 UTC, Paulo Zanoni
no flags Details | Splinter Review
dmesg dump with i915.edp_delays=4 and drm.debug=0xe on HEAD of branch edp_reverts (108.57 KB, text/plain)
2014-02-10 13:03 UTC, Patrik Jakobsson
no flags Details
Set EDP_FORCE_VDD bit in (1.42 KB, text/plain)
2014-03-02 16:16 UTC, Patrik Jakobsson
no flags Details
dmesg from broken setup (_vdd_on / _vdd_off in intel_disable_dp) (111.05 KB, text/plain)
2014-03-02 16:26 UTC, Patrik Jakobsson
no flags Details
dmesg from working setup (EDP_FORCE_VDD in _edp_panel_off) (111.31 KB, text/plain)
2014-03-02 16:28 UTC, Patrik Jakobsson
no flags Details
Patch with _vdd_on/_vdd_off wrapped intel_disable_dp and EDP_FORCE_VDD bit cleared (2.02 KB, patch)
2014-03-03 08:40 UTC, Patrik Jakobsson
no flags Details | Splinter Review

Description Chris Wilson 2014-02-06 17:22:02 UTC
From Patrik Jakobsson [http://lists.freedesktop.org/archives/intel-gfx/2014-February/039628.html]

Starting with this patch I get a blank screen when booting my MacBook Air 6,2.
Reverting only this patch on top of 3.14-rc1 doesn't help so it's most likely
the entire series that needs to be looked at.

Doing a suspend/resume fixes the problem.

commit 90791a5c644e2e06cadfe4f37de8ca81483e3a72
Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
Date:   Fri Dec 6 17:32:42 2013 -0200

    drm/i915: fix VDD override off wait
    
    If we're disabling the VDD override bit and the panel is enabled, we
    don't need to wait for anything. If the panel is disabled, then we
    need to actually wait for panel_power_cycle_delay, not
    panel_power_down_delay, because the power down delay was already
    respected when we disabled the panel.
    
    Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
    Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Comment 1 Paulo Zanoni 2014-02-06 19:27:42 UTC
Hi

Can you please boot with drm.debug=0xe and attach the output of "dmesg"?

Thanks,
Paulo
Comment 2 Patrik Jakobsson 2014-02-06 19:51:23 UTC
Created attachment 93565 [details]
dmesg dump with drm.debug=0xe
Comment 3 Paulo Zanoni 2014-02-06 21:43:07 UTC
Created attachment 93568 [details] [review]
Patch with debugging option

Hi

This patch adds a Kernel command line option that will help us debug the problem.

Please apply the patch, then try booting with:
- i915.edp_delays=0
- i915.edp_delays=1
- i915.edp_delays=2
- i915.edp_delays=3
- i915.edp_delays=4

And please tell us which ones solve the bug for you.

If you discover that i915.edp_delays=4 solves the problem for you, you could also try removing chunks of code that look for "i915.edp_delays == EDP_DELAYS_I915_OLD" until you get a minimal set of checks that are essential to get your Kernel working. But this could easily take you a few hours of debugging :)

Thanks,
Paulo
Comment 4 Patrik Jakobsson 2014-02-07 01:28:25 UTC
I applied the patch to drm-intel-next (from Daniels repo).

Unfortunately none of the edp_delays solved the problem. Maybe I should have pointed out that I do get console output while booting but when X starts everything goes black. Backlight is on and can be changed while the screen is black.

Any other ideas?
Comment 5 Paulo Zanoni 2014-02-07 23:18:09 UTC
Hi

I made some slight mistakes on yesterday's patch, and I also forgot to revert
one commit. Can you please test
http://cgit.freedesktop.org/~pzanoni/linux/?h=edp-reverts ? Please _make sure_
you're on the edp-reverts branch, and also please make sure you're using
i915.edp_delays=4 and drm.debug=0xe as the Kernel command line parameter.

After you boot, please also run dmesg | grep "eDP delays" just to make sure
you're using the right option :)

If this works for you, you can try reverting the top commits until it stops
working.

Thanks,
Paulo
Comment 6 Patrik Jakobsson 2014-02-10 12:59:43 UTC
Hi Paulo, thanks for looking into this.

I still get a blank screen when trying HEAD at this branch with i915.edp_delays=4 and drm.debug=0xe. dmesg tells me it's active so I got the correct kernel running.

I assume you've reverted the whole series at this stage so there must be something else that changed around eDP. I did a bisect twice on 3.14-rc1 and both pointed to the reported commit. 

/me is scratching my head
Comment 7 Patrik Jakobsson 2014-02-10 13:03:42 UTC
Created attachment 93769 [details]
dmesg dump with i915.edp_delays=4 and drm.debug=0xe on HEAD of branch edp_reverts
Comment 8 Jani Nikula 2014-02-10 13:35:29 UTC
Patrik, make sure you have

commit ec5e0cfb19e79ce3a87b281ce4c2682eb659fa6e
Author: Imre Deak <imre.deak@intel.com>
Date:   Wed Jan 29 13:25:40 2014 +0200

    drm/i915: fix wait_remaining_ms_from_jiffies

from drm-intel-nightly.

Note the branches have moved to a new repo at fdo: http://cgit.freedesktop.org/drm-intel
Comment 9 Patrik Jakobsson 2014-02-10 14:18:43 UTC
Yes I have ec5e0cfb19e79ce3a87b281ce4c2682eb659fa6e

By looking at my dmesg it seems the last VDD change is:
[   12.131461] [drm:edp_panel_vdd_off_sync], Turning eDP VDD off
[   12.131474] [drm:edp_panel_vdd_off_sync], PP_STATUS: 0x80000008 PP_CONTROL: 0xabcd0007

Why off and not on?
Comment 10 Jani Nikula 2014-02-10 15:33:02 UTC
(In reply to comment #9)
> Why off and not on?

It's a force VDD bypassing regular panel power sequencing.
Comment 11 Patrik Jakobsson 2014-03-02 00:14:21 UTC
Finally had some time to look at this again so I did a new bisect but on the -nightly branch and for some reason I got a new first-bad-commit. Not sure why I saw that other patch on the previous 3-4 bisects. Did the patch order change?

Turned out to be the EDP_FORCE_VDD bit missing in ironlake_edp_panel_off(). I've submitted a patch to intel-gfx that solves this problem.

Thanks
Patrik
Comment 12 Patrik Jakobsson 2014-03-02 16:16:30 UTC
Created attachment 94966 [details]
Set EDP_FORCE_VDD bit in
Comment 13 Patrik Jakobsson 2014-03-02 16:20:33 UTC
Moving the conversation back here (my bad)...

Chris Wilson wrote:

I'd feel more comfortable with;

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 46d065b..876184f 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1872,9 +1872,11 @@ static void intel_disable_dp(struct intel_encoder *encoder)

        /* Make sure the panel is off before trying to change the mode. But also
         * ensure that we have vdd while we switch off the panel. */
+       edp_panel_vdd_on(intel_dp);
        intel_edp_backlight_off(intel_dp);
        intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
        intel_edp_panel_off(intel_dp);
+       edp_panel_vdd_off(intel_dp, true);

        /* cpu edp my only be disable _after_ the cpu pipe/plane is disabled. */
        if (!(port == PORT_A || IS_VALLEYVIEW(dev)))

Or that vdd_off may have to be post-disable.
Comment 14 Patrik Jakobsson 2014-03-02 16:24:27 UTC
Calling vdd_on / vdd_off in intel_disble_dp doesn't fix the problem. I'm attaching the broken and working dmesg (applied on top of drm-intel-nightly). Seems I get an extra call to ironlake_edp_panel_vdd_on() with my patch applied.
Comment 15 Patrik Jakobsson 2014-03-02 16:26:44 UTC
Created attachment 94967 [details]
dmesg from broken setup (_vdd_on / _vdd_off in intel_disable_dp)
Comment 16 Patrik Jakobsson 2014-03-02 16:28:05 UTC
Created attachment 94968 [details]
dmesg from working setup (EDP_FORCE_VDD in _edp_panel_off)
Comment 17 Patrik Jakobsson 2014-03-02 16:32:27 UTC
Correction... I'm obviously doing this on drm-intel-fixes (hence the ironlake_ prefixes).
Comment 18 Chris Wilson 2014-03-02 17:11:19 UTC
Patrik, can you try moving the edp_panel_vdd_off() that I added down into intel_post_disable_dp()?

The problem as I see it is the hack is to leave the vdd on virtually forever, which may or may not consume a lot of extra power.
Comment 19 Patrik Jakobsson 2014-03-02 17:44:42 UTC
I moved it to the bottom of intel_post_disable_dp() (outside the if-stmt) but that didn't do it either. Not sure at what stage the EDP_FORCE_VDD bit is needed (link training?). Not a VESA member so no docs here.
Comment 20 Chris Wilson 2014-03-02 20:07:56 UTC
Thinking about it, I think both patches are required. Definitely we need to or in the bit there as in your patch to preserve the VDD setting during the disable. And I think we also need the explicit VDD frobbing during disable.
Comment 21 Patrik Jakobsson 2014-03-03 08:40:51 UTC
Created attachment 95007 [details] [review]
Patch with _vdd_on/_vdd_off wrapped intel_disable_dp and EDP_FORCE_VDD bit cleared

So something like this? Paulo, anything you would like to add? If this is ok I'll resend it to the list.
Comment 22 Daniel Vetter 2014-03-03 08:54:39 UTC
Patrik: Please reword the commit message to make it clear it's a regression. Usually we go with "This regression has been introduced in <commit citation" in a separate paragraph to really make it stand out. Just process nit from me, thanks for taking care of this issue ;-)
Comment 23 Patrik Jakobsson 2014-03-03 23:48:13 UTC
Patch sent with better description of the regression. I forgot to tag it v2 in the patch subject so make sure you pick the right one for -fixes.

Thanks
Comment 24 Chris Wilson 2014-03-04 14:32:13 UTC
Hmm, I worry about the interaction of this patch with bug 75401.
Comment 25 Jani Nikula 2014-03-19 09:03:31 UTC
Thanks for the report, fixed by
commit 825938307f812c7cbfe064c7884bd8bdb27c2144
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Mon Mar 17 15:20:59 2014 +0200

    Revert "drm/i915: don't touch the VDD when disabling the panel"
Comment 26 Jari Tahvanainen 2016-11-22 08:59:52 UTC
Closing resolved+fixed. 2.5 years with no comments.


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.