Bug 83130 - [BDW Bisected] Screen flickers when it changes to console from X
Summary: [BDW Bisected] Screen flickers when it changes to console from X
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: high critical
Assignee: Intel GFX Bugs mailing list
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords: bisected
Depends on:
Blocks:
 
Reported: 2014-08-27 07:38 UTC by liulei
Modified: 2016-11-03 12:41 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description liulei 2014-08-27 07:38:34 UTC
==System Environment==
--------------------------
Regression: Yes. Good commit: 3a5f87c286515c54ff5c52c3e64d0c522b7570c0
    drm: fix plane rotation when restoring fbdev configuration

Non-working platforms: Broadwell

==kernel==
--------------------------
-nightly: c30b73ce7c138b5fd671ed3a7e1301bd273fd661 (fails)
    drm-intel-nightly: 2014y-08m-26d-16h-36m-49s integration manifest
-queued: c1f7ab8c9a7b09f4ed6499904298ddf1c67b1764(fails)
    drm/i915/bdw: Do not initialize PPGTT in the legacy way for execlists
-fixes: a4bf214ffc721f3b82321714d614be937b982a94 (works)
    drm/i915: Move intel_ddi_set_vc_payload_alloc(false) to haswell_crtc_disable()

==Bug detailed description==
-----------------------------
Screen starts to flicker after I start X or back to console from X. I will attach a Video later.

==Reproduce steps==
---------------------------- 
1. start X 
or shatr X and chvt 1

==Bisect results==
----------------------------
Bisect shows: 3497c2a466ef2c72305180df5a09955ba95550cd is the first bad commit.
commit 3497c2a466ef2c72305180df5a09955ba95550cd
Author:     Deepak S <deepak.s@intel.com>
AuthorDate: Mon Aug 18 10:35:27 2014 -0700
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Tue Aug 26 12:54:10 2014 +0200

    drm/i915: Bring UP Power Wells before disabling RC6.

    We need do forcewake before Disabling RC6, This is what the BIOS
    expects while going into suspend.

    v2: updated commit message. (Daniel)
Comment 1 liulei 2014-08-29 02:00:32 UTC
Screen flickers video URL: http://youtu.be/yvKyowUghC0
Comment 2 liulei 2014-08-29 02:03:38 UTC
Screen flickers on console mode video URL https://www.youtube.com/watch?v=LTbnUOPdlCo&feature=youtu.be
Comment 3 Chris Wilson 2014-08-29 06:11:12 UTC
I believe Rodrigo has also encountered something like this.
Comment 4 Deepak S 2014-08-29 08:06:32 UTC
HI All,

Does below commit causing the issue?

commit 3497c2a466ef2c72305180df5a09955ba95550cd
Author:     Deepak S <deepak.s@intel.com>
AuthorDate: Mon Aug 18 10:35:27 2014 -0700
Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
CommitDate: Tue Aug 26 12:54:10 2014 +0200

    drm/i915: Bring UP Power Wells before disabling RC6.

Thanks
Deepak
Comment 5 liulei 2014-09-01 05:52:58 UTC
(In reply to comment #4)
> HI All,
> 
> Does below commit causing the issue?
> 
> commit 3497c2a466ef2c72305180df5a09955ba95550cd
> Author:     Deepak S <deepak.s@intel.com>
> AuthorDate: Mon Aug 18 10:35:27 2014 -0700
> Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
> CommitDate: Tue Aug 26 12:54:10 2014 +0200
> 
>     drm/i915: Bring UP Power Wells before disabling RC6.
> 
> Thanks
> Deepak
Rebisect. It's not your commit that cause this issue. Sorry for this.
Comment 6 liulei 2014-09-01 05:54:29 UTC
I bisected this issue, again. And find it's below commit cause this issue.
commit d91a2cb8e5104233c02bbde539bd4ee455ec12ac
Author: Sonika Jindal <sonika.jindal@intel.com>
Date:   Fri Aug 22 14:06:04 2014 +0530

    drm/i915: Add 180 degree primary plane rotation support

    Primary planes support 180 degree rotation. Expose the feature
    through rotation drm property.

    v2: Calculating linear/tiled offsets based on pipe source width and
    height. Added 180 degree rotation support in ironlake_update_plane.

    v3: Checking if CRTC is active before issueing update_plane. Added
    wait for vblank to make sure we dont overtake page flips. Disabling
    FBC since it does not work with rotated planes.

    v4: Updated rotation checks for pending flips, fbc disable. Creating
    rotation property only for Gen4 onwards. Property resetting as part
    of lastclose.

    v5: Resetting property in i915_driver_lastclose properly for planes
    and crtcs. Fixed linear offset calculation that was off by 1 w.r.t
    width in i9xx_update_plane and ironlake_update_plane. Removed tab
    based indentation and unnecessary braces in intel_crtc_set_property
    and intel_update_fbc. FBC and flip related checks should be done only
    for valid crtcs.

    v6: Minor nits in FBC disable checks for comments in intel_crtc_set_property
    and positioning the disable code in intel_update_fbc.

    v7: In case rotation property on inactive crtc is updated, we return
    successfully printing debug log as crtc is inactive and only property change
    is preserved.

    v8: update_plane is changed to update_primary_plane, crtc->fb is changed to
    crtc->primary->fb  and return value of update_primary_plane is ignored.

    v9: added rotation property to primary plane instead of crtc. Removing reset
    of rotation property from lastclose. rotation_property is moved to
    drm_mode_config, so drm layer will take care of resetting. Adding updation o
    fbc when rotation is set to 0. Allowing rotation only if value is
different than old one.


    v10: Calling intel_primary_plane_setplane instead of update_primary_plane in
    set_property(Daniel).

    v11: Using same set_property function for both primary and sprite, Adding
    primary plane specific code in the same function (Matt).

    v12: Removing disabling/ enabling of fbc from set_property because it is don
    from intel_pipe_set_base. Other formatting

    v13: we need to call disable_fbc before changing the rotation to 180,
    disable_fbc from intel_pipe_set_base gets called very late, that will
    be used to re-enable fbc if rotation is set to 0 (Ville).

    Testcase: igt/kms_rotation_crc
Comment 7 Deepak S 2014-09-01 05:56:03 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > HI All,
> > 
> > Does below commit causing the issue?
> > 
> > commit 3497c2a466ef2c72305180df5a09955ba95550cd
> > Author:     Deepak S <deepak.s@intel.com>
> > AuthorDate: Mon Aug 18 10:35:27 2014 -0700
> > Commit:     Daniel Vetter <daniel.vetter@ffwll.ch>
> > CommitDate: Tue Aug 26 12:54:10 2014 +0200
> > 
> >     drm/i915: Bring UP Power Wells before disabling RC6.
> > 
> > Thanks
> > Deepak
> Rebisect. It's not your commit that cause this issue. Sorry for this.
Thanks
Comment 8 Gordon Jin 2014-09-15 07:08:13 UTC
Daniel, would you revert?
Comment 9 Jani Nikula 2014-09-15 11:04:11 UTC
It does not revert cleanly anymore.
Comment 10 Sonika 2014-09-16 08:16:19 UTC
I tried to reproduce the issue with drm-intel-nightly on Broadwell and valleyview, but could not see any flicker when moving from console to X or vice versa.

Broadwell setup:
BDW – U
WPT F0 2+2 QH3G
BIOS: BDW-E1R1.86C.0092.R00.1408311942

Valleyview setup:
BYT-T
Bios: BLAKCRB1.X64.PR58.R22.1309101521

This is what I tried:
1. Boot the kernel from usb. This lands into fb console mode
2. startx. This started X term
3. Ctrl+Atl+F1 : Move back to fb console mode (No flicker)
4. Ctrl+c: to stop X (No flicker)

Can you please confirm with the latest drm-intel-nightly ?
Comment 11 liulei 2014-09-17 02:09:11 UTC
(In reply to comment #10)
> I tried to reproduce the issue with drm-intel-nightly on Broadwell and
> valleyview, but could not see any flicker when moving from console to X or
> vice versa.
> 
> Broadwell setup:
> BDW – U
> WPT F0 2+2 QH3G
> BIOS: BDW-E1R1.86C.0092.R00.1408311942
> 
> Valleyview setup:
> BYT-T
> Bios: BLAKCRB1.X64.PR58.R22.1309101521
> 
> This is what I tried:
> 1. Boot the kernel from usb. This lands into fb console mode
> 2. startx. This started X term
> 3. Ctrl+Atl+F1 : Move back to fb console mode (No flicker)
> 4. Ctrl+c: to stop X (No flicker)
> 
> Can you please confirm with the latest drm-intel-nightly ?

This issue has gone on Latest drm-intel-nightly and on latest -fixes.
Comment 12 Jani Nikula 2014-09-17 11:29:06 UTC
It would be interesting to see if reverting

commit 13a366ba834d6d7db70c339f056abb54ec0e168b
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Tue Sep 9 11:25:13 2014 +0300

    drm/i915/edp: use lane count and link rate from DPCD for eDP

brings the flicker back.
Comment 13 Jari Tahvanainen 2016-11-03 12:41:59 UTC
Closing verified+fixed.


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.